Paul Raines wrote:
> >> Current implementation of IN is very simple. As you see from EXPLAIN
> >> for each row from mdc1_runs server performes SeqScan on mdc1_simu.
> >> Try to create index on mdc1_simu (version) and let's know about results.
> >> Also, you could create index on mdc1_simu (version, runnum) and re-write
> >> your query as
> >> select distinct runtype from mdc1_runs where
> >> EXISTS (select * from mdc1_runs where version = '...' and
> >> runnum = mdc1_runs.runnum);
> >> - this can be faster.
> It was about 4 seconds faster. After creating the indices, the
> above took < 3 seconds, as did the original subselect statement.
Please remember us how long query was in Oracle.
Also, as I understand, subselect with EXISTS takes < 3 sec and
original subselect (with IN) takes ~ 7 sec - is this correct ?
pgsql-hackers by date
|Next:||From: Bruce Momjian||Date: 1998-03-30 18:34:15|
|Subject: Re: Let's talk up 6.3|
|Previous:||From: Zeugswetter Andreas SARZ||Date: 1998-03-30 18:19:01|
|Subject: AW: [HACKERS] Re: Let's talk up 6.3|