Re: Index Scans become Seq Scans after VACUUM ANALYSE - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: Index Scans become Seq Scans after VACUUM ANALYSE
Date
Msg-id 3CBD8811.51BC2751@fourpalms.org
Whole thread Raw
In response to Re: Index Scans become Seq Scans after VACUUM ANALYSE  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Responses Re: Index Scans become Seq Scans after VACUUM ANALYSE  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
...
> I experienced myself many times, joints have to be rewrited...
> This is really true for outter joins (LEFT/RIGHT join). And it has to be
> tested with explain plans.

It is particularly true for "join syntax" as used in outer joins because
*that bypasses the optimizer entirely*!!! I'd like to see that changed,
since the choice of syntax should have no effect on performance. And
although the optimizer can adjust query plans to choose the best one
(most of the time anyway ;) there is likely to be *only one correct way
to write a query using join syntax*. *Every* other choice for query will
be wrong, from a performance standpoint.

That is a bigger "foot gun" than the other things we are talking about,
imho.
                 - Thomas

foot gun (n.) A tool built solely for shooting oneself or another person
in the foot.


pgsql-hackers by date:

Previous
From: mlw
Date:
Subject: Re: Index Scans become Seq Scans after VACUUM ANALYSE
Next
From: Tom Lane
Date:
Subject: Re: huge runtime difference between 2 almost identical queries (was: Re: Index Scans become Seq Scans after VACUUM ANALYSE)