Re: [GENERAL] Very suspicious plan difference for select and corresponding delete queries PostgreSQL 9.6.2 - Mailing list pgsql-general

From Tom Lane
Subject Re: [GENERAL] Very suspicious plan difference for select and corresponding delete queries PostgreSQL 9.6.2
Date
Msg-id 4119.1494250196@sss.pgh.pa.us
Whole thread Raw
In response to [GENERAL] Very suspicious plan difference for select and corresponding deletequeries PostgreSQL 9.6.2  (Maxim Boguk <maxim.boguk@gmail.com>)
List pgsql-general
Maxim Boguk <maxim.boguk@gmail.com> writes:
> I can not see any possible/logical/realistic reason for the database to
> switch between INDEX ONLY SCAN and SEQ SCAN for EXIST part of query in this
> two cases.

If you'd done an EXPLAIN VERBOSE, you'd have noted that the scan was
returning ctid, which it could not get out of the index.  This is
necessary for possible EPQ rechecks.

            regards, tom lane


pgsql-general by date:

Previous
From: Maxim Boguk
Date:
Subject: [GENERAL] Very suspicious plan difference for select and corresponding deletequeries PostgreSQL 9.6.2
Next
From: PAWAN SHARMA
Date:
Subject: [GENERAL] Migration Query