From: hans wulf <lotu1@gmx.net>
To: pgsql-performance@postgresql.org
Subject: ANTI-JOIN needs table, index scan not possible?
Date: Fri, 11 Mar 2011 16:32:05 +0100
Message-ID: <20110311153205.6380@gmx.net> (raw)
Hi,
I need an ANTI-JOIN (not exists SELECT something from table.../ left join table WHERE table.id IS NULL) on the same table. Acutally I have an index to serve the not exists question, but the query planner chooses to to a bitmap heap scan.
The table has 100 Mio rows, so doing a heap scan is messed up...
It would be really fast if Postgres could compare the to indicies. Does Postgres have to visit the table for this ANTI-JOIN?
I know the table has to be visitied at some point to serve the MVCC, but why so early? Can NOT ESISTS only be fixed by the table, because it could miss soemthing otherwise?
--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: lotu1@gmx.net
Subject: Re: ANTI-JOIN needs table, index scan not possible?
In-Reply-To: <20110311153205.6380@gmx.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox