Received: from hotmail.com (law-f93.hotmail.com [209.185.131.156]) by hub.org (8.9.3/8.9.3) with SMTP id DAA13436 for ; Tue, 2 Nov 1999 03:43:03 -0500 (EST) (envelope-from oomoomi@hotmail.com) Received: (qmail 59187 invoked by uid 0); 2 Nov 1999 08:42:31 -0000 Message-ID: <19991102084231.59186.qmail@hotmail.com> Received: from 195.200.226.110 by www.hotmail.com with HTTP; Tue, 02 Nov 1999 00:42:30 PST X-Originating-IP: [195.200.226.110] From: "omid omoomi" To: pgsql-sql@postgreSQL.org Subject: Re: Antw: [SQL] query with subquery abnormally slow? Date: Tue, 02 Nov 1999 00:42:30 PST Mime-Version: 1.0 Content-Type: text/plain; format=flowed Hello ,,, don't you think that you should use a multiple row function ( such as sum() or ... ) along with 'group by' clause in that query? regards , omid omoomi >From: "Gerhard Dieringer" >To: >Subject: Antw: [SQL] query with subquery abnormally slow? >Date: Tue, 02 Nov 1999 07:45:31 +0100 > > > > >>> Oskar Liljeblad 01.11.1999 19.47 Uhr >>> > >>I'm doing a SELECT query with a subquery on a table with 12K rows > >>but it is very slow (10 seconds+). The query looks like this: > >> > >> select * > >> from items > >> where package in > >> (select package > >> from items > >> where ...blah... > >> group by package) > >> ..... > >I am sorry if I am still sleeping and don't see the problem, but what is >the difference between this querry and the following: > >select * > from items > where ...blah... > >Gerhard > > > >************ > > ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com