| From: | Masaru Sugawara <rk73(at)sea(dot)plala(dot)or(dot)jp> |
|---|---|
| To: | Alvar Freude <alvar(at)a-blast(dot)org> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: 2 Selects 1 is faster, why? |
| Date: | 2002-06-27 15:04:07 |
| Message-ID: | 20020627234531.7ECB.RK73@sea.plala.or.jp |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On Wed, 26 Jun 2002 17:34:47 +0200
Alvar Freude <alvar(at)a-blast(dot)org> wrote:
> Hi,
>
> -- Eric <emayo(at)pozicom(dot)net> wrote:
>
> > If I perform the following 2 selects, the first one is EXTREMELY slow
> > where the 2nd one is very fast.
>
> [...]
>
> > Why would 2 be so much faster? I have ran the EXPLAIN on this and index
> > scans are being used.
>
> I guess, the first query has to search for all ol.orderid the equivalent
> o.orderid; the second variant only has to search for '1234' in each
> ?.orderid, which is much faster.
You are right. And this type of optimising are not yet implemented.
Tom said it in the prior discussions.
Regards,
Masaru Sugawara
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Gunther Schadow | 2002-06-27 15:19:05 | Re: Possibility of Index-Only access in PostgreSQL? |
| Previous Message | Richard Poole | 2002-06-27 15:02:08 | Re: CHECK clause doesn't work with CASE clause |