Re: Index optimization ? - Mailing list pgsql-general

From Bo Lorentsen
Subject Re: Index optimization ?
Date
Msg-id 41EBDE7F.9050607@netgroup.dk
Whole thread Raw
In response to Re: Index optimization ?  (Greg Stark <gsstark@mit.edu>)
Responses Re: Index optimization ?
List pgsql-general
Greg Stark wrote:

>If Postgres used an index it would call odd(), which would return 1 because
>it's the first time, and then Postgres would go look up the rows where col is
>1 and return all of them. That's a very different behaviour from if the index
>isn't used. If all the records have col=1 then you're getting all of the
>records instead of half of them. If col=0 then you're getting none of them
>instead of half of them.
>
>
This is the differance between "volatile" and "stable" functions, but
not the answer to why an index lookuo are per query and not per row, is
it not ?

/BL

pgsql-general by date:

Previous
From: "Frank D. Engel, Jr."
Date:
Subject: Re: Index optimization ?
Next
From: Tom Lane
Date:
Subject: Re: PQexecParams and CURSOR