Re: [HACKERS] Interesting behaviour !

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: [HACKERS] Interesting behaviour !
Дата
Msg-id 378C662A.B3FFD088@trust.ee
обсуждение исходный текст
Ответ на Interesting behaviour !  (Constantin Teodorescu <teo@flex.ro>)
Список pgsql-hackers
Constantin Teodorescu wrote:
> 
> 
> create table "note" (id serial,perioada int2,schema int2,explicatie
> text,...);
> 
...
> 
> contabil=> explain select * from note where perioada=15;
> NOTICE:  QUERY PLAN:
> Seq Scan on note  (cost=1099.99 rows=1600 width=87)

You may try :

explain select * from note where perioada=15::int2;

i think that the default for 'untyped' numbers is int4 and 
this currently confuses the optimiser.

------------------
Hannu


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

Предыдущее
От: Nuchanach Klinjun
Дата:
Сообщение: upgrade problem
Следующее
От: Duane Currie
Дата:
Сообщение: Re: [HACKERS] Counting bool flags in a complex query