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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-hackers by date

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