Search Postgresql Archives

Re: Why sequential scan for currval?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux