Re: Optimizing a condition based on an a very unequally

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Optimizing a condition based on an a very unequally
Дата
Msg-id 20020313113933.M85167-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Optimizing a condition based on an a very unequally distributed value.  ("Nick Fankhauser" <nickf@ontko.com>)
Ответы Re: Optimizing a condition based on an a very unequally distributed value.  ("Nick Fankhauser" <nickf@ontko.com>)
Список pgsql-admin
On Wed, 13 Mar 2002, Nick Fankhauser wrote:

> So my question in general is why does PGSQL opt to use the index when
> looking for the single field row, and not use it when looking for the other
> 23768 rows?

Because in many cases the sequence scan will be faster than an index scan
when you're trying to get most of the rows of the table. Since the tuple
validity is in the table row and not the index, it's still got to check
the table which would involve lots of random reads into that file, so
you're doing even more disk operations and less efficient ones.


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

Предыдущее
От: "A.J. Haigh C9803392"
Дата:
Сообщение: Postgre 7.1.3 and Solaris Install Problems
Следующее
От: bangh
Дата:
Сообщение: Re: Update 6.5 database files to 7.0