From: | "Matthias Urlichs" <smurf(at)noris(dot)net> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Matthias Urlichs <smurf(at)noris(dot)net>, Mike Mascari <mascarm(at)mascari(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: More Performance |
Date: | 2000-05-20 20:40:43 |
Message-ID: | 20000520224043.G11220@noris.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Hi,
Bruce Momjian:
> > IMHO this is somewhat non-optimal. In the absence of information
> > to the contrary, PostgreSQL should default to using an index if
> > it might be appropriate, not ignore it.
>
> This is an interesting idea. So you are saying that if a column has no
> vacuum analyze statistics, assume it is unique?
Nope. But why should vacuum analyze be the one and only part of
PostgreSQL where statistics are ever updated?
When you have no statistics, a "column_name=CONSTANT" query for an
indexed column yields exactly one result (actually, "significantly fewer
results than there are 8-kbyte records in the table" would do), you
might want to record the fact that using the index might, in hindsight,
have been a good idea after all.
Then, when the next query like that comes in, you use the index.
Maybe I'm too naive ;-) but I fail to see how this approach could
be either hard to implement or detrimental to performance.
--
Matthias Urlichs | noris network GmbH | smurf(at)noris(dot)de | ICQ: 20193661
The quote was selected randomly. Really. | http://smurf.noris.de/
--
An Army travels on her stomach.
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2000-05-20 20:43:57 | Re: More Performance |
Previous Message | Matthias Urlichs | 2000-05-20 20:30:21 | Re: More Performance |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2000-05-20 20:43:57 | Re: More Performance |
Previous Message | Matthias Urlichs | 2000-05-20 20:30:21 | Re: More Performance |