Skip site navigation (1) Skip section navigation (2)

Re: Strange behaviour of SELECT ... IN

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: <jsarmiento(at)camaralima(dot)org(dot)pe>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Strange behaviour of SELECT ... IN
Date: 2002-06-26 21:12:38
Message-ID: 20020626141106.M96143-100000@megazone23.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-general
On Wed, 26 Jun 2002, Jorge Sarmiento wrote:

> the first one is an INDEX SCAN, the second one a SEQUENTIAL SCAN.
>
> number of rows in table has nothing to do...

Sure it does.  As the number of rows selected approaches the number
of rows in the table the cost of the index scan relative to sequential
scan can increase due to the fact that we're reading both the index
and the heap blocks (for row validity testing - and doing it in a
possibly random order) as opposed to a sequential read set of the heap.




In response to

pgsql-general by date

Next:From: Andrew SullivanDate: 2002-06-26 21:44:14
Subject: Re: Advocacy Idea.
Previous:From: Carl MeyerDate: 2002-06-26 20:52:46
Subject: Re: unlimited undo/journaling

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group