[PERFORM] ANTI-JOIN needs table, index scan not possible?

2011-03-11 Thread hans wulf
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

Re: [PERFORM] big joins not converging

2011-03-11 Thread fork
Dan Ancona da at vizbang.com writes: his is a choice between developing some in-house capacity for this and sending people to various vendors so we'll probably lean on the vendors for now, at least while we work on it. I would try to do the record matching in house and see how far

Re: [PERFORM] ANTI-JOIN needs table, index scan not possible?

2011-03-11 Thread Maciek Sakrejda
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? Possibly because the index entries you're anti-joining against may point to deleted tuples, so you would erroneously

Re: [PERFORM] Table partitioning problem

2011-03-11 Thread Robert Haas
On Thu, Mar 10, 2011 at 3:25 AM, Samba GUEYE samba.gu...@intesens.com wrote: The measure insertion is successful but problems raise up when inserting in the simpleMeasure table because it can't find the foreign key inserted the measure table and do not look at the partitionned tables Yes,

Re: [PERFORM] Tuning massive UPDATES and GROUP BY's?

2011-03-11 Thread fork
Marti Raudsepp marti at juffo.org writes: If you don't mind long recovery times in case of a crash, set checkpoint_segments to ~100 and checkpoint_completion_target=0.9; this will improve write throughput significantly. Sounds good. Also, if you don't mind CORRUPTing your database after a

Re: [PERFORM] ANTI-JOIN needs table, index scan not possible?

2011-03-11 Thread hans wulf
Thanks for the answer. so there's no way around this problem? A nice index bitmap merge thing would be super fast. Big table ANTI JOIN queries with only a few results expected, are totally broken, if this is true. This way the query breaks my neck. This is a massive downside of postgres which

Re: [PERFORM] ANTI-JOIN needs table, index scan not possible?

2011-03-11 Thread Kenneth Marshall
On Fri, Mar 11, 2011 at 06:54:39PM +0100, hans wulf wrote: Thanks for the answer. so there's no way around this problem? A nice index bitmap merge thing would be super fast. Big table ANTI JOIN queries with only a few results expected, are totally broken, if this is true. This way the

Re: [PERFORM] ANTI-JOIN needs table, index scan not possible?

2011-03-11 Thread Kevin Grittner
Kenneth Marshall k...@rice.edu wrote: On Fri, Mar 11, 2011 at 06:54:39PM +0100, hans wulf wrote: so there's no way around this problem? A nice index bitmap merge thing would be super fast. Big table ANTI JOIN queries with only a few results expected, are totally broken, if this is true.