Received: from server.beierfeld.kabeljournal.de (pD900DD75.dip.t-dialin.net [217.0.221.117]) by postgresql.org (8.11.3/8.11.4) with SMTP id g0LE4OV34693 for ; Mon, 21 Jan 2002 09:04:25 -0500 (EST) (envelope-from andre.schubert@kabeljournal.de) Received: (qmail 3770 invoked from network); 21 Jan 2002 14:03:37 -0000 Received: from station158.beierfeld.kabeljournal.de (HELO kabeljournal.de) (192.168.128.158) by server.beierfeld.kabeljournal.de with SMTP; 21 Jan 2002 14:03:37 -0000 Message-ID: <3C4C1FC3.1EDD1034@kabeljournal.de> Date: Mon, 21 Jan 2002 15:03:47 +0100 From: Andre Schubert X-Mailer: Mozilla 4.77 [de] (X11; U; Linux 2.2.14-5.0 i586) X-Accept-Language: en MIME-Version: 1.0 To: "pgsql-admin@postgresql.org" Subject: Subselects and Indices Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200201/131 X-Sequence-Number: 3018 Hi, i have a simple question on indices and subselects. Lets say i have a table foo with a column id int8 as primary_key bar. If i do a select * from foo where id = 10 then the index bar is used. if i do select * from foo where id in (10,20) then the index is used. but if id do select * from foo where id in ( select 10 ) then the index is not used. Can anyone explain me this. It is very important, because i have to do this subselect. thanks, as