pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Masaru Sugawara <rk73@sea.plala.or.jp>
To: Alvar Freude <alvar@a-blast.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: 2 Selects 1 is faster, why?
Date: Fri, 28 Jun 2002 00:04:07 +0900
Message-ID: <20020627234531.7ECB.RK73@sea.plala.or.jp> (raw)
In-Reply-To: <1371510000.1025105687@gnarzelwicht.delirium-arts.de>
References: <afag3c$kce$1@news.hub.org>
	<1371510000.1025105687@gnarzelwicht.delirium-arts.de>

On Wed, 26 Jun 2002 17:34:47 +0200
Alvar Freude <alvar@a-blast.org> wrote:


> Hi,
> 
> -- Eric <emayo@pozicom.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







view thread (5+ messages)  latest in thread

Message-ID: <20020627234531.7ECB.RK73@sea.plala.or.jp>
Permalink:  ../20020627234531.7ECB.RK73@sea.plala.or.jp/
Also on:    postgresql.org/message-id/20020627234531.7ECB.RK73@sea.plala.or.jp

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: rk73@sea.plala.or.jp, alvar@a-blast.org
  Subject: Re: 2 Selects 1 is faster, why?
  In-Reply-To: <20020627234531.7ECB.RK73@sea.plala.or.jp>

* 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