Re: More Performance
От | Matthias Urlichs |
---|---|
Тема | Re: More Performance |
Дата | |
Msg-id | 20000520224043.G11220@noris.de обсуждение исходный текст |
Ответ на | Re: More Performance (Bruce Momjian <pgman@candle.pha.pa.us>) |
Список | 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@noris.de | ICQ: 20193661 The quote was selected randomly. Really. | http://smurf.noris.de/ -- An Army travels on her stomach.
В списке pgsql-hackers по дате отправления: