Re: what's going on here? - Mailing list pgsql-general

From Stephan Szabo
Subject Re: what's going on here?
Date
Msg-id Pine.BSF.4.21.0103091414110.82014-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: what's going on here?  (Ben <bench@silentmedia.com>)
Responses Re: what's going on here?
List 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?


pgsql-general by date:

Previous
From: Ben
Date:
Subject: Re: what's going on here?
Next
From: "Martin A. Marques"
Date:
Subject: postgres and readline lib