X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 13D9FD1B8A5 for ; Thu, 28 Aug 2003 00:11:47 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 78302-07 for ; Wed, 27 Aug 2003 21:11:19 -0300 (ADT) Received: from home.samurai.com (home.samurai.com [205.207.28.66]) by svr1.postgresql.org (Postfix) with ESMTP id 189E3D1B8E6 for ; Wed, 27 Aug 2003 21:11:16 -0300 (ADT) Received: by home.samurai.com (Postfix, from userid 1014) id 430BD26224; Wed, 27 Aug 2003 20:11:19 -0400 (EDT) Date: Wed, 27 Aug 2003 20:11:19 -0400 From: Neil Conway To: Michael Guerin Cc: pgsql-performance@postgresql.org Subject: Re: Simple queries take forever to run Message-ID: <20030828001119.GB63737@home.samurai.com> References: <3F4D2535.8050103@rentec.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F4D2535.8050103@rentec.com> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/360 X-Sequence-Number: 3176 On Wed, Aug 27, 2003 at 05:40:05PM -0400, Michael Guerin wrote: > ex. query: select * from x where id in (select id from y); > > There's an index on each table for id. SQL Server takes <1s to return, > postgresql doesn't return at all, neither does explain analyze. This particular form of query is a known performance problem for PostgreSQL 7.3 and earlier -- the problem should hopefully be fixed in 7.4 (currently in beta). Check the archives for more discussion on this topic. -Neil