Re: key = currval('tab_key_seq') choses SEQSCAN?!

Поиск
Список
Период
Сортировка
От Martin Marques
Тема Re: key = currval('tab_key_seq') choses SEQSCAN?!
Дата
Msg-id 200402251908.24347.martin@bugs.unl.edu.ar
обсуждение исходный текст
Ответ на key = currval('tab_key_seq') choses SEQSCAN?!  (Brandon Craig Rhodes <brandon@oit.gatech.edu>)
Список pgsql-general
El Mié 25 Feb 2004 18:52, Brandon Craig Rhodes escribió:
>
> But this same table suddenly becomes unwilling to use an index scan if
> the target value is the result of the currval() function:
>
> # explain select * from changes where change =
> currval('changes_change_seq'); QUERY PLAN

Try with this:

explain select * from changes where change = (SELECT
currval('changes_change_seq'))::INT;

--
 19:06:01 up 92 days,  1:15,  3 users,  load average: 0.72, 0.37, 0.24
-----------------------------------------------------------------
Martín Marqués        | select 'mmarques' || '@' || 'unl.edu.ar'
Centro de Telematica  |  DBA, Programador, Administrador
             Universidad Nacional
                  del Litoral
-----------------------------------------------------------------


В списке pgsql-general по дате отправления:

Предыдущее
От: Brandon Craig Rhodes
Дата:
Сообщение: key = currval('tab_key_seq') choses SEQSCAN?!
Следующее
От: "Sally Sally"
Дата:
Сообщение: reindexing, pg_class (and other system tables)