Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: PSQL and many queries

by sundialsvc4 (Abbot)
on Mar 24, 2009 at 02:59 UTC ( #752776=note: print w/replies, xml ) Need Help??

in reply to PSQL and many queries

Do it the COBOL way:

  1. Sort the file in ascending order by name, using a disk-based sort. (Don't worry... the operation is uncommonly fast.)
  2. Query the database, ORDER BY name. If you like, go ahead and extract this into another flat-file.
  3. Now you are presented with two identically sorted data-streams. The operation that you are now looking to perform is called a merge.

It is possible to perform this operation (of course, without writing any new code to do so yourself...) by processing the two files sequentially. No searching is required. “10 million records?” No problem!

(If you ever watched old sci-fi movies and wondered “what all those spinning tapes were doing” ... now you know.)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://752776]
[Tanktalus]: hippo: I don't care, I just want to prove it can match correctly compared to, say, ILIKE / UPPER / LOWER in postgres :)
[LanX]: is there a unicode convention that ß is ss ?
[Tanktalus]: LanX: yes :) I haven't tried java, but I have this match working in its bastard cousin, C# :) I just thought perl's unicode support would get me there :)
[LanX]: I have my doubts, IMHO its a workaround if the glyph is missing
[LanX]: (they are pronounced differently)
[choroba]: perl -Mutf8 -Mfeature=fc -wE 'say fc "straße" eq fc "strasse"'
[choroba]: returns 1 for me
[choroba]: are they?
[LanX]: strict rules : the a is long in "straße" and short in "strasse"
[choroba]: So the "a" is different, not the "s" ;-)

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2018-03-21 15:45 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (268 votes). Check out past polls.