Re: Index optimization ?

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Bo Lorentsen <bl(at)netgroup(dot)dk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Index optimization ?
Date: 2005-01-15 18:32:41
Message-ID: 20050115183241.GA9898@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message PFC 2005-01-15 19:20:04 Re: OID Usage
Previous Message Tom Lane 2005-01-15 18:27:49 Re: Index optimization ?