Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id C3D031337BB9 for ; Mon, 21 Mar 2011 23:56:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 38264-01 for ; Tue, 22 Mar 2011 02:56:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gx0-f174.google.com (mail-gx0-f174.google.com [209.85.161.174]) by mail.postgresql.org (Postfix) with ESMTP id 54EB91337B9C for ; Mon, 21 Mar 2011 23:56:02 -0300 (ADT) Received: by gxk21 with SMTP id 21so2707870gxk.19 for ; Mon, 21 Mar 2011 19:56:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:references:in-reply-to:subject:date :message-id:mime-version:content-type:content-transfer-encoding :x-mailer:thread-index:content-language; bh=5cu4loGyDA0DKgBGqBWG8LqMaytZzcxiGA7HOJNlUAE=; b=h///g6e3khRs1D7OHtPBD9vM/gOj9qJ5ywIUF/LcbrExOwzXFFPlhRYc62nRxYwnec qbRU5SUTFQMI4YnlRemxx0oAkbU0nyrNPRJqGsPBxz8Z+O3koL6kpoDOVB/3tGRrHnel FuEh+KvcBfynbJHe0xpq/c+J8VS9jOEv+hIMM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-type:content-transfer-encoding:x-mailer :thread-index:content-language; b=jrENy0I5VvV+8+Y7vVG+ZpZg2EU2/X/M1vxQl8ayg5p0PhQffZLZ0FdN4EdbngvFmH WFCrKCdXZwvCqd6Uwl/c+w5KS7vKU04zufFzlN7Ibmp1hAgzSoxkEXpXfL39YvCcvKGh yQNrJf0UPLnoKV/sLpYTo//dmc2NDkUNuxmqw= Received: by 10.151.142.3 with SMTP id u3mr4659185ybn.214.1300762562287; Mon, 21 Mar 2011 19:56:02 -0700 (PDT) Received: from Duality (174-29-69-53.hlrn.qwest.net [174.29.69.53]) by mx.google.com with ESMTPS id d3sm3436031ybi.5.2011.03.21.19.55.58 (version=SSLv3 cipher=OTHER); Mon, 21 Mar 2011 19:55:59 -0700 (PDT) From: "mark" To: "'Adam Tistler'" , "'Pavel Stehule'" Cc: References: <75F42287-42D3-4FD5-AFFA-64B1CE3C0195@gmail.com> <035B29F0-1441-4FC7-8B24-FAC8DB745C89@gmail.com> In-Reply-To: <035B29F0-1441-4FC7-8B24-FAC8DB745C89@gmail.com> Subject: Re: Select in subselect vs select = any array Date: Mon, 21 Mar 2011 20:55:11 -0600 Message-ID: <01fa01cbe83c$90b146d0$b213d470$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acvnj6hKkyEcQGVcTOqhMyUo0NUl8wAq8uGQ Content-Language: en-us X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201103/243 X-Sequence-Number: 42922 > -----Original Message----- > From: pgsql-performance-owner@postgresql.org [mailto:pgsql-performance- > owner@postgresql.org] On Behalf Of Adam Tistler > Sent: Monday, March 21, 2011 12:17 AM > To: Pavel Stehule > Cc: pgsql-performance@postgresql.org > Subject: Re: [PERFORM] Select in subselect vs select = any array > > Pavel, thanks for the help. > > I increased work_mem from 16MB to 64MB, no difference. The queries are > really just a test case. My actual queries are actual just large > number of primary keys that I am selecting from the db: > > For example: > select * from nodes where node_id in ( 1, 2, 3 ..... ) > What does "large" number of primary keys mean ? I have seen some "odd" things happen when I passed, carelessly, tens of thousands of items to an in list for a generated query, but I don't get the feeling that isn't the case here. ..: Mark