Skip site navigation (1) Skip section navigation (2)

Re: Let's talk up 6.3

From: "Vadim B(dot) Mikheev" <vadim(at)sable(dot)krasnoyarsk(dot)su>
To: raines(at)SLAC(dot)Stanford(dot)EDU
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: Let's talk up 6.3
Date: 1998-03-30 18:31:41
Message-ID: 351FE50D.B98B347A@sable.krasnoyarsk.su (view raw or flat)
Thread:
Lists: pgsql-hackers
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 ?

Vadim

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1998-03-30 18:34:15
Subject: Re: Let's talk up 6.3
Previous:From: Zeugswetter Andreas SARZDate: 1998-03-30 18:19:01
Subject: AW: [HACKERS] Re: Let's talk up 6.3

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group