Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 3D313476452 for ; Fri, 27 Sep 2002 12:15:33 -0400 (EDT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id CB0AC4763DD for ; Fri, 27 Sep 2002 12:15:32 -0400 (EDT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 05F96D61C; Fri, 27 Sep 2002 09:15:34 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id EFC3D5C02; Fri, 27 Sep 2002 09:15:34 -0700 (PDT) Date: Fri, 27 Sep 2002 09:15:34 -0700 (PDT) From: Stephan Szabo To: Waruna Geekiyanage Cc: Subject: Re: Sub SELECTS In-Reply-To: <003701c2649f$a5f6fc80$705e5ecb@A.GEEKIYANAGE> Message-ID: <20020927091506.X40745-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/299 X-Sequence-Number: 5838 On Wed, 25 Sep 2002, Waruna Geekiyanage wrote: > I have a select query with 2 sub selects. > When I run that query CPU usage goes to 98% for postgres. > Does sub selects eat more resources and slower the queries? > Is there any alternatives to sub selects? It depends on what you're doing. The query and table schema would be useful.