Re: How to get around LIKE inefficiencies?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: How to get around LIKE inefficiencies?
Дата
Msg-id 200011060424.XAA13363@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:
> > Well, I think it would be helpful to catch the most obvious things
> > people forget, but if no one thinks its a good idea, I will yank it.
> 
> If you've got an idea *how* to do it in any sort of reliable fashion,
> I'm all ears.  But it sounds more like pie-in-the-sky to me.

But I like pie.  :-)

Well, we could throw a message when the optimizer tries to get
statistics on a column with no analyze stats, or table stats on a table
that has never been vacuumed, or does a sequential scan on a table that
has >%50 expired rows.  

We could throw a message when a query does an index scan that bounces
all over the heap looking for a single value.  We could though a message
when a constant is compared to a column, and there is no index on the
column.

Not perfect, but would help catch some obvious things people forget.


--  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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: How to get around LIKE inefficiencies?
Следующее
От: Karel Zak
Дата:
Сообщение: Re: AW: Re: [GENERAL] Query caching