pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nikolay Samokhvalov <samokhvalov@gmail.com>
To: Christian Rengstl <Christian.Rengstl@klinik.uni-regensburg.de>
Cc: pgsql-general@postgresql.org
Subject: Re: Query performance
Date: Thu, 3 Aug 2006 12:37:51 +0400
Message-ID: <e431ff4c0608030137h335d3307s2256e15e444168@mail.gmail.com> (raw)
In-Reply-To: <44D1CC21.0AD0.0080.0@klinik.uni-regensburg.de>
References: <44D1CC21.0AD0.0080.0@klinik.uni-regensburg.de>

On 8/3/06, Christian Rengstl <Christian.Rengstl@klinik.uni-regensburg.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



view thread (47+ messages)  latest in thread

Message-ID: <e431ff4c0608030137h335d3307s2256e15e444168@mail.gmail.com>
Permalink:  ../e431ff4c0608030137h335d3307s2256e15e444168@mail.gmail.com/
Also on:    postgresql.org/message-id/e431ff4c0608030137h335d3307s2256e15e444168@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: samokhvalov@gmail.com, Christian.Rengstl@klinik.uni-regensburg.de
  Subject: Re: Query performance
  In-Reply-To: <e431ff4c0608030137h335d3307s2256e15e444168@mail.gmail.com>
  References: <44D1CC21.0AD0.0080.0@klinik.uni-regensburg.de> <e431ff4c0608030137h335d3307s2256e15e444168@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox