Re: continuous copy/update one table to another

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Szymon Guz <mabewlun(at)gmail(dot)com>
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: continuous copy/update one table to another
Date: 2010-03-01 15:39:21
Message-ID: 17132.1267457961@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Szymon Guz <mabewlun(at)gmail(dot)com> writes:
> W dniu 1 marca 2010 09:40 uytkownik Grzegorz Jakiewicz
> <gryzman(at)gmail(dot)com>napisa:
>> don't use 'NOT EXISTS', as this will be damn slow. Use LEFT JOIN.

> Right, LEFT JOIN should be faster (with proper indices even much faster).

Converting NOT EXISTS into an outer join is a manual application of an
optimization that Postgres can do for itself in 8.4 and up. So the
above advice should only be correct for 8.3 or before.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-03-01 16:04:46 Re: Optimizer: ranges and partial indices? Or use partitioning?
Previous Message michael uwe maier 2010-03-01 13:52:41 custom index