Re: Why sequential scan for currval?

From: John Barham <jbarham(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Why sequential scan for currval?
Date: 2005-04-27 07:32:27
Message-ID: 4f34febc05042700323fa02243@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> test=# explain select s from tt where id = currval('tt_id_key');
> QUERY PLAN
> ------------------------------------------------------
> Seq Scan on tt (cost=0.00..1734.42 rows=1 width=32)
> Filter: (id = currval('tt_id_key'::text))
> (2 rows)

should be:

test=# explain select s from tt where id = currval('tt_id_seq'); --
tt_id_seq vs. tt_id_key
QUERY PLAN
------------------------------------------------------
Seq Scan on tt (cost=0.00..1734.42 rows=1 width=32)
Filter: (id = currval('tt_id_seq'::text))
(2 rows)

but the question still holds.

John

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Green 2005-04-27 07:40:58 Re: www.thekompany.com rekall
Previous Message John Barham 2005-04-27 07:28:18 Why sequential scan for currval?