Re: Index optimization ?

From: Bo Lorentsen <bl(at)netgroup(dot)dk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Index optimization ?
Date: 2005-01-19 06:50:51
Message-ID: 41EE034B.8060008@netgroup.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greg Stark wrote:

>>I understand that, I just can't see why an index lookup can't be used on "per
>>row" basis.
>>
>>
>
>Well, how would that work?
>
>
>
Well, good point, the "per row" is a set of data selected as a product
of the "static" part os the query (non volatile parts), the only thing
you can do with this dataset is seq scan this, and use the volatile
functions on each row. I just could not see this ... until now :-)

If your query is only volatile (like a currval) then PG will select all
the table as a dataset and use the volatile expression on each, and that
I did not understand, as it semmed more logical to use the index, but I
learned :-)

/BL

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ken Tozier 2005-01-19 06:58:03 Re: Getting table metadata
Previous Message Bo Lorentsen 2005-01-19 06:40:18 Re: Index optimization ?