Re: How does Index Scan get used

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
Cc: "Samuel J(dot) Sutjiono" <ssutjiono(at)wc-group(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: How does Index Scan get used
Date: 2002-02-22 19:32:53
Message-ID: 1014406374.13241.2406.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(dot)Elphick(at)lfix(dot)co(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Frank Bax 2002-02-22 20:13:37 Re: How does Index Scan get used
Previous Message Fernando Schapachnik 2002-02-22 18:46:48 Re: [SQL] Regular Expression for 'and' instead of 'or'