Re: Index optimization ? - Mailing list pgsql-general

From Michael Fuhr
Subject Re: Index optimization ?
Date
Msg-id 20050115183241.GA9898@winnie.fuhr.org
Whole thread Raw
In response to Index optimization ?  (Bo Lorentsen <bl@netgroup.dk>)
Responses Re: Index optimization ?
List pgsql-general
On Sat, Jan 15, 2005 at 07:03:43PM +0100, Bo Lorentsen wrote:

> select * from sale where id = currval( 'sale_id_seq' )::bigint;
>
> But this still did not work (still using seq scan) :-(

currval() is volatile.  See "Function Volatility Categories" in the
"Extending SQL" chapter of the documentation and search the list
archives for past discussion of currval()'s volatility.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Index optimization ?
Next
From: PFC
Date:
Subject: Re: OID Usage