Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id D0462B5DBF8 for ; Tue, 24 May 2011 16:49:14 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 80089-05 for ; Tue, 24 May 2011 19:49:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f46.google.com (mail-bw0-f46.google.com [209.85.214.46]) by mail.postgresql.org (Postfix) with ESMTP id 59437B5DBF0 for ; Tue, 24 May 2011 16:49:07 -0300 (ADT) Received: by bwz15 with SMTP id 15so5919800bwz.19 for ; Tue, 24 May 2011 12:49:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=S2sYhoHMGklVMokG1DVdnvGltfAnkqCBkMtNddQ9AQk=; b=jQ6zlYXp8jiIF7AMHxqgF0fS/vl9uSj2n1pWDLGqI6KG03Ncyb74D8IrmNgt43hSO7 sf8e/yYAaWBZIspLOClm4TW/FI4EGvq3cHXMy0hSz3wGusZW6KBSYTfyI6lrF+KeRGv1 9t0vhLno8qk6OdxXi6+Ulw2zpAWGeUpSeYavQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=ASDs1MP/l23eIVtHb9bscTB+a95lSbWzPpSDwPiJHprz+D3J/Pssv5b7yCs0Etw5L2 DGhUhi6KmXMqab1+9tXdimmvSwk7mK9aqiJIdIL9LdA/EPyFEiml5RfHvfu+tV0Ote8y ucfQ/TfnTZes4hpPeAyy2Ui1uJkWM0FvMR8qM= MIME-Version: 1.0 Received: by 10.204.16.216 with SMTP id p24mr3398653bka.5.1306266546516; Tue, 24 May 2011 12:49:06 -0700 (PDT) Received: by 10.204.39.10 with HTTP; Tue, 24 May 2011 12:49:06 -0700 (PDT) In-Reply-To: References: <4DD10533.7050904@postnewspapers.com.au> Date: Tue, 24 May 2011 15:49:06 -0400 Message-ID: Subject: Re: Performance of NOT IN and <> with PG 9.0.4 From: Robert Haas To: Jasmin Dizdarevic Cc: pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.898 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RFC_ABUSE_POST=0.001 X-Spam-Level: X-Archive-Number: 201105/153 X-Sequence-Number: 35437 On Tue, May 24, 2011 at 3:32 PM, Jasmin Dizdarevic wrote: > enable_material = off Is there any chance you can reproduce this with a simpler test case that doesn't involve quite so many joins? It looks to me like shutting off enable_material is saving you mostly by accident here. There's only one materialize node in the whole plan. And just incidentally, do you have any of the other enable_* settings turned off? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company