Re: [GENERAL] 50 MB Table - Mailing list pgsql-general

From JB
Subject Re: [GENERAL] 50 MB Table
Date
Msg-id 38C67C6B.44FC32A2@kw.igs.net
Whole thread Raw
In response to Re: [GENERAL] 50 MB Table  (m.malicky@landesmuseum-linz.ac.at)
List pgsql-general
After much futzing and fiddling I've determined, umm, well very little
regarding my problem but a little more about PG. The LIKE query does use
the index if and only if, the '%' is at the tail of the string and there
is only one '%' in the string. So LIKE 'MAIN%' does use the index but
LIKE '%MAIN%' won't. This was verified on the HACKERS list. This means
that the 'substring' query that I used should be a heck of a lot slower.
EXPLAIN bears this out where the 'substring' query looked at 15,000 rows
+- and the LIKE 'MAIN%' used 30 rows. In practise tho, I still wait for
the LIKE query for a lot longer than the 'substring' one. The problem, I
think I can safely say, is not here. Which leaves me with the setup,
implementation, memory usage, OS, permissions, etc.

Sorry for all the traffic and confusion. I'll report back when I figure
this out.

cheers
jb

--
This is the first age that's paid much attention to the future, which is
a
little ironic since we may not have one.
        -- Arthur Clarke

pgsql-general by date:

Previous
From: Guillermo Iglesias
Date:
Subject: User authentication problem
Next
From:
Date:
Subject: mydate >'TODAY' not working on 6.5.1 with dbi