Re: Index optimization ?

From: Bo Lorentsen <bl(at)netgroup(dot)dk>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Index optimization ?
Date: 2005-01-17 15:49:19
Message-ID: 41EBDE7F.9050607@netgroup.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Frank D. Engel, Jr. 2005-01-17 15:51:40 Re: Index optimization ?
Previous Message Bo Lorentsen 2005-01-17 15:46:31 Re: Index optimization ?