Maxim Boguk <maxim.boguk@xxxxxxxxx> 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 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general