Re: what's going on here?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Ben <bench(at)silentmedia(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: what's going on here?
Date: 2001-03-09 22:17:38
Message-ID: Pine.BSF.4.21.0103091414110.82014-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> This I don't follow. The stream=1 query is returning 10 times the rows -
> shouldn't that make the use of an index even *more* likely?

No, because if you're getting a large % of the rows of the table it'll be
faster to sequentially scan the heap rather than do so in random access by
the index order. (You have to go into the heap file for the info on
whether or not the tuple is valid, and you'd potentially be seeking around
the heap file which can end up being more expensive).

As a question, does an index on stream, played (both in the same
index) help at all?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martin A. Marques 2001-03-09 22:21:39 postgres and readline lib
Previous Message Ben 2001-03-09 22:05:43 Re: what's going on here?