Re: How to get around LIKE inefficiencies? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: How to get around LIKE inefficiencies?
Date
Msg-id 1772.973478830@sss.pgh.pa.us
Whole thread Raw
In response to Re: How to get around LIKE inefficiencies?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: How to get around LIKE inefficiencies?  (Philip Warner <pjw@rhyme.com.au>)
Re: How to get around LIKE inefficiencies?]  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Sorry to be getting in here late.  Have you tried CLUSTER?

Prolly won't help much.  I think what he's getting burnt by
is that the planner thinks that an indexscan based on the
LIKE 'http://www.postgresql.org/%' condition will be extremely
selective --- it has no idea that most of the URLs in his table
will match that prefix.  It's ye same olde nonuniform-distribution
problem; until we have better statistics, there's not much hope
for a non-kluge solution.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: How to get around LIKE inefficiencies?
Next
From: Philip Warner
Date:
Subject: Re: How to get around LIKE inefficiencies?