Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UD1u3-0001l2-EB for pgsql-performance@arkaria.postgresql.org; Wed, 06 Mar 2013 00:08:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UD1u2-0007ln-Qg for pgsql-performance@arkaria.postgresql.org; Wed, 06 Mar 2013 00:08:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UD1u1-0007kZ-FT for pgsql-performance@postgresql.org; Wed, 06 Mar 2013 00:08:13 +0000 Received: from 30.55.colo.spiretech.net ([69.168.55.30] helo=lists.commandprompt.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UD1ty-00006g-7F for pgsql-performance@postgresql.org; Wed, 06 Mar 2013 00:08:12 +0000 Received: from [192.168.1.5] (spinlock.commandprompt.com [69.168.55.30]) by lists.commandprompt.com (Postfix) with ESMTPA id 0ED2D3C9; Tue, 5 Mar 2013 16:08:06 -0800 (PST) Received: from [192.168.1.5] ([71.95.101.172] helo=[192.168.1.5]) by assp.commandprompt.com with ESMTPS(AES256-SHA) (2.1.1); 5 Mar 2013 16:08:06 -0800 Message-ID: <513688B9.5080504@commandprompt.com> Date: Tue, 05 Mar 2013 16:07:21 -0800 From: "Joshua D. Drake" Organization: Command Prompt, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130221 Thunderbird/17.0.3 MIME-Version: 1.0 To: =?windows-1252?Q?Niels_Kristian_Schj=F8dt?= CC: Julien Cigar , pgsql-performance@postgresql.org Subject: Re: Optimize SELECT * from table WHERE foreign_key_id IN (key1,key2,key3,key4...) References: <513600A4.7090602@ulb.ac.be> <653B0909-A122-44B5-B2A7-A8A524963AB6@autouncle.com> In-Reply-To: <653B0909-A122-44B5-B2A7-A8A524963AB6@autouncle.com> Content-Type: text/plain; charset=windows-1252; format=flowed X-Assp-Version: 2.1.1(11364) on assp.commandprompt.com X-Assp-Client-SSL: yes X-Assp-ID: assp.commandprompt.com m1-28486-09637 X-Assp-Envelope-From: jd@commandprompt.com X-Assp-Intended-For: nielskristian@autouncle.com X-Assp-Original-Subject: Re: [PERFORM] Optimize SELECT * from table WHERE foreign_key_id IN(key1,key2,key3,key4...) Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 03/05/2013 03:51 PM, Niels Kristian Schj=F8dt wrote: >> 3ms isn't slow >> > Sorry, it's 3323ms! > >>> Can I do anything to optimize that query or maybe the index or somethin= g? >> >> your index is already used > > Okay this leaves me with - "get better hardware" or? What does explain analyze say versus just explain. JD --=20 Command Prompt, Inc. - http://www.commandprompt.com/ PostgreSQL Support, Training, Professional Services and Development High Availability, Oracle Conversion, Postgres-XC @cmdpromptinc - 509-416-6579 --=20 Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance