Re: Antw: [SQL] query with subquery abnormally slow?

From: "omid omoomi" <oomoomi(at)hotmail(dot)com>
To: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: Antw: [SQL] query with subquery abnormally slow?
Date: 1999-11-02 00:42:30
Message-ID: 19991102084231.59186.qmail@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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" <DieringG(at)eba-haus(dot)de>
>To: <pgsql-sql(at)postgreSQL(dot)org>
>Subject: Antw: [SQL] query with subquery abnormally slow?
>Date: Tue, 02 Nov 1999 07:45:31 +0100
>
>
>
> >>> Oskar Liljeblad <osk(at)hem(dot)passagen(dot)se> 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

Browse pgsql-sql by date

  From Date Subject
Next Message Chris Griffin 1999-11-02 00:51:49 SQL Info
Previous Message Tom Lane 1999-11-01 22:10:28 Re: [SQL] query with subquery abnormally slow?