Re: Index Scans become Seq Scans after VACUUM ANALYSE

Поиск
Список
Период
Сортировка
От mlw
Тема Re: Index Scans become Seq Scans after VACUUM ANALYSE
Дата
Msg-id 3CBD0F78.80010F68@mohawksoft.com
обсуждение исходный текст
Ответ на Re: Index Scans become Seq Scans after VACUUM ANALYSE  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Ответы Re: Index Scans become Seq Scans after VACUUM ANALYSE  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Re: Index Scans become Seq Scans after VACUUM ANALYSE  (Jean-Paul ARGUDO <jean-paul.argudo@idealx.com>)
Re: Index Scans become Seq Scans after VACUUM ANALYSE  (Hannu Krosing <hannu@krosing.net>)
Re: Index Scans become Seq Scans after VACUUM ANALYSE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Christopher Kings-Lynne wrote:
> 
> > I have bitched about the index stuff for a while, and always have
> > bumped up
> > against this problem. If I can sway anyone's opinion, I would say, unless
> > (using Tom's words) a "factor of 2" planner difference against, I
> > would use an
> > index. Rather than needing clear evidence to use an index, I
> > would say you need
> > clear evidence not too.
> 
> I spend a lot of time answering questions on various database forums and I
> find that the single thing that most newbies just cannot understand is that
> a sequential scan is often a lot faster than an index scan.  They just
> cannot comprehend that an index can be slower.  Ever.  For any query.  That
> is not our problem...

Here is the problem, in a single paragraph.

If the DBA notices that there is a problem with a query, he adds an index, he
notices that there is no difference, then he notices that PostgreSQL is not
using his index. First and foremost he gets mad at PostgreSQL for not using his
index. If PostgreSQL decided to use an index which increases execution time,
the DBA would delete the index. If PostgreSQL does not use an index, he has to
modify the posgresql.conf file, which disallows PostgreSQL from using an index
when it would be a clear loser.

My assertion is this: "If a DBA creates an index, he has a basis for his
actions."


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

Предыдущее
От: mlw
Дата:
Сообщение: Re: Index Scans become Seq Scans after VACUUM ANALYSE
Следующее
От: Oliver Elphick
Дата:
Сообщение: Re: Index Scans become Seq Scans after VACUUM ANALYSE