Jonathan Vanasco wrote:
hoping someone may be able to offer advice:.
SELECT
*
FROM
table_a
WHERE
id != 10001
AND
(
( field_1 ilike '123' )
OR
( field_2 ilike 'abc' )
)
You seem to use that ilike expression merely as a
create a function lower index and instead of calling ilike call ~
lower('123')
To clarify a little:
CREATE INDEX table_a_lower_field_1_idx on table_a ((lower(field_1)));
CREATE INDEX table_a_lower_field_2_idx on table_a ((lower(field_2)));
SELECT
*
FROM
table_a
WHERE
if you have time, could you offer advice on this:
i'm doing a database cleanup right now -- 1.4M records -- and each
query is taking 1 second
i can't really wait 2 weeks for this to finish , so I'm hoping that
someone will be able to help out
the issue is that the planner keeps doing a
QUERY PLAN
-
Seq Scan on table_a
On Fri, 2007-03-16 at 12:17 -0700, Joshua D. Drake wrote:
QUERY PLAN
On Mar 16, 2007, at 3:48 PM, Jeff Davis wrote:
To clarify a little:
No clarifcation needed. Joshua Drake's suggestion made perfect sense
and I was able to implement in 2 seconds.
works like a charm!
ETA 2 weeks - 30mins
Thanks to all.
// Jonathan Vanasco
| - - - - - - - - - - - - -