Re: sorter script [was: Frustrated newbie question]

From: Drieux (drieux_at_wetware.com)
Date: 12/11/03


Date: Wed, 10 Dec 2003 16:52:51 -0800
To: Perl Perl <beginners@perl.org>


On Dec 9, 2003, at 4:20 PM, R. Joseph Newton wrote:
[..]
> To me hashes are like sausage to a carnivore--I love the end product,
> but
> have no desire to look too closely at the process.
[..]

first the last,
the schwartzian transformation I included
was from the "perldoc -q sort" as a way of
noting that there are some interesting things
that can be done, if done well, in memory.

So on top of the usual 'portability' sets
of issues there is also the problem that
some 'sort' utilities will 'fault' to an
I/O event to write out intermediary stage
results, so as to save on memory usage.

The PPT version of sort does not take a
-T <dir> option to allow one to fan out
the intermediary stages, nor does it offer
a -ykmem option... caveat emptor.

Warning: Serious GEEKING...

I like your idea of 'shape()' - in the abstract -
as a way of 'visualizing' the problem. Since that
does point back to the 'design elements' of a
well done 'database solution'. { for me, many
of the 'implementation details' of DataBaseFoo,
should be handled, like hashes, as things we do,
but prefer not to talk about in polite society. }

The problem with 'aesthetics' - my 'ugly sort'
kvetch, is that at times a bit of brute force
is 'good enough' - and can be better than the
most 'elegant' of looking algorithms.

One case in particular that left scars was what
technically was an 'elegant' SQL query a co-worker
had constructed. Since it seemed to be simpler. The problem was
that it meant a series of "interesting" join statements
that bogged the database engine down. { some of that
was due to bad implementation on the db engine. }
Rather than taking the 'less elegant' "bute force"
approach of two 'get foo' things that would dump
more bits on the wire, but less weight on the db engine,
and the post processing was done on 'cheaper'
support servers.

So while a given algorithm may map out as
O(<foo_val>) in the logical analysis, depending
upon what else is in play, it may have an impact
that is disproportionate.

ciao
drieux

---


Relevant Pages

  • Re: i wanna look cute today...
    ... re-fill it with hot water in the morning to get the car started. ... So most folk would have just plain water in there if they were doing ... needed some sort of corrosion inhibitor. ... often quite capable of stripping and re-building an engine or gear-box at ...
    (uk.people.support.depression)
  • Re: Primary Key not sorted
    ... Are you willing to rely on any "natural" sort of records? ... > though the Company field is the Primary Key but if I ... When I Compact and Repair the database it ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Data sorting for print job
    ... Hence if they pick the second data field then it will sort on this ... 1] is a database the best way or are there alternatives such as ... Access is not bad as a desktop database. ... OTOH, relational database management systems usually are more ...
    (borland.public.delphi.database.ado)
  • Re: Somebody *please* talk me out of this
    ... At least it has the right engine. ... shot of the MX5 is that need to stop pouring money into it. ... maybe be able to help sort it using the rollers there once the wiring etc is ... Nothing to do with a decent offer I've got for the car, ...
    (uk.rec.cars.modifications)
  • Re: I dont know how to link VB to database (ODBC) table.
    ... The Provider/Driver -> Uses a Connection String to access a Database engine ... The Jet engine -> Uses your data store. ... Under TextBox Property ...
    (microsoft.public.vb.general.discussion)