pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Elphick <olly@lfix.co.uk>
To: Oliver Elphick <olly@lfix.co.uk>
Cc: Samuel J. Sutjiono <ssutjiono@wc-group.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: How does Index Scan get used
Date: 22 Feb 2002 19:32:53 +0000
Message-ID: <1014406374.13241.2406.camel@linda> (raw)
In-Reply-To: <1014401308.13240.2302.camel@linda>
References: <018a01c1bbaf$befb84b0$110a010a@headquarters.wcgroup.com>
	<1014401308.13240.2302.camel@linda>

On Fri, 2002-02-22 at 18:08, Oliver Elphick wrote:
> PostgreSQL thinks there are only 10 rows in the table.  Therefore it
> will not choose an index scan because for so few rows it is bound to be
> more expensive than a sequential scan.

But then I saw Tom's mail saying that it does use the index.  How is
that?  Surely these few values would all be brought in in one single
disk read?

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C

     "The LORD bless thee, and keep thee; The LORD make his
      face shine upon thee, and be gracious unto thee; The 
      LORD lift up his countenance upon thee, and give thee 
      peace."              Numbers 6:24-26 




view thread (7+ messages)  latest in thread

Message-ID: <1014406374.13241.2406.camel@linda>
Permalink:  ../1014406374.13241.2406.camel@linda/
Also on:    postgresql.org/message-id/1014406374.13241.2406.camel@linda

 · 

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: olly@lfix.co.uk, ssutjiono@wc-group.com
  Subject: Re: How does Index Scan get used
  In-Reply-To: <1014406374.13241.2406.camel@linda>

* 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