Re: [HACKERS] Interesting behaviour !

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] Interesting behaviour !
Дата
Msg-id 199907141514.LAA23027@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Interesting behaviour !  (Constantin Teodorescu <teo@flex.ro>)
Список pgsql-hackers
> Hannu Krosing wrote:
> > 
> > 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.
> 
> You are right! Thanks a lot! Watch this!
> 
> contabil=> explain select * from note where perioada=29::int2;
> NOTICE:  QUERY PLAN:
> Index Scan using note_perioada on note  (cost=108.96 rows=1600 width=87)
> 
> EXPLAIN
> contabil=> explain select * from note where perioada=29;
> NOTICE:  QUERY PLAN:
> Seq Scan on note  (cost=1099.99 rows=1600 width=87)
> 
> My queries are faster now!
> 
> I think that this thing should be fixed. You need more than common SQL
> in order to optimize your queries.
> That conversions should be automatically assumed by the query optimizer
> in order to deliver real performances.
> I don't know how difficult that would be.

I thought we had this fixed in 6.5.  Is that what you are using?

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


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

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: Re: Arrays versus 'type constant' syntax
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Updated TODO list