Re: How to get around LIKE inefficiencies?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: The Hermit Hacker <scrappy(at)hub(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: How to get around LIKE inefficiencies?
Date: 2000-11-06 04:24:45
Message-ID: 200011060424.XAA13363@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-11-06 04:26:44 Re: How to get around LIKE inefficiencies?
Previous Message Bruce Momjian 2000-11-06 04:14:56 Re: How to get around LIKE inefficiencies?