Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id B870E3F6470 for ; Sat, 7 Jan 2012 16:16:31 -0400 (AST) Received: from mail-iy0-f174.google.com ([209.85.210.174]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Rjcgl-0001a4-57 for pgsql-performance@postgresql.org; Sat, 07 Jan 2012 20:16:32 +0000 Received: by iaeh11 with SMTP id h11so4540914iae.19 for ; Sat, 07 Jan 2012 12:16:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=u4HRFabAVLbr9fPrtAUvuIFSardeaonIlvx1a9yAKHs=; b=CQGN4S+EYgxPfYIIUC3lc82BAkFKm8rsKhJVk3Aup+lEaaaQURuPwKePmNbKgG4cuj o92iZdBbQj/WeZP5rfh2TxZ6vVzTazCvIqMCeKix1PhsYxmaoW9yctTdEaerFLu5cqZB Sk2gJaKJJeYOcc7CKU8PofLIzk+rlKJTpbf+g= Received: by 10.42.142.129 with SMTP id s1mr5851936icu.42.1325967373779; Sat, 07 Jan 2012 12:16:13 -0800 (PST) MIME-Version: 1.0 From: Misa Simic Date: Sat, 7 Jan 2012 12:16:13 -0800 Message-ID: <-1818149885061307584@unknownmsgid> Subject: Re: Duplicate deletion optimizations To: Jochen Erwied Cc: "pgsql-performance@postgresql.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201201/22 X-Sequence-Number: 46035 It was not query... Just sentence where some index values in one table not exist in another... So query could be with: =E2=80=A2 WHERE (col1,col2,col2) NOT IN =E2=80=A2 WHERE NOT EXISTS =E2=80=A2 LEFT JOIN live USING (col1,col2,col2) WHERE live.id IS NULL what ever whoever prefer more or what gives better results... But I think it is more personal feelings which is better then real... Sent from my Windows Phone From: Jochen Erwied Sent: 07/01/2012 15:18 To: Misa Simic Cc: pgsql-performance@postgresql.org Subject: Re: [PERFORM] Duplicate deletion optimizations Saturday, January 7, 2012, 3:02:10 PM you wrote: > =E2=80=A2 insert into live from temp where col1, col2 and col3 not exists= in > live 'not exists' is something I'm trying to avoid, even if the optimizer is able to handle it. --=20 Jochen Erwied | home: jochen@erwied.eu +49-208-38800-18, FAX: -19 Sauerbruchstr. 17 | work: joe@mbs-software.de +49-2151-7294-24, FAX: -50 D-45470 Muelheim | mobile: jochen.erwied@vodafone.de +49-173-5404164