Re: How to get around LIKE inefficiencies?]

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: How to get around LIKE inefficiencies?]
Дата
Msg-id 200011060248.VAA08902@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: How to get around LIKE inefficiencies?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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.

But I think it will help.  There will be lots of index lookups, but they
will be sequential in the heap, not random over the heap.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Philip Warner
Дата:
Сообщение: Re: How to get around LIKE inefficiencies?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: How to get around LIKE inefficiencies?