Re: Query performance

From: "Nikolay Samokhvalov" <samokhvalov(at)gmail(dot)com>
To: "Christian Rengstl" <Christian(dot)Rengstl(at)klinik(dot)uni-regensburg(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Query performance
Date: 2006-08-03 08:37:51
Message-ID: e431ff4c0608030137h335d3307s2256e15e444168@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 8/3/06, Christian Rengstl <Christian(dot)Rengstl(at)klinik(dot)uni-regensburg(dot)de> wrote:
> ...
> Unfortunately the query takes pretty long for the big table, so maybe one of you has a suggestion on how to make it faster.
>

try smth like this:

select val1, val2, crit from mytable as a where pid='somepid' and
exists(select 1 from myCritTable as b where a.crit = b.crit);

--
Best regards,
Nikolay

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Hannes Dorbath 2006-08-03 08:44:02 TSearch: Need debug help
Previous Message Hakan Kocaman 2006-08-03 08:34:02 Re: Query performance