Re: [GENERAL] scenario with a slow query

2012-01-19 Thread Volodymyr Kostyrko
Tom Lane wrote: Volodymyr Kostyrko writes: Maybe I'm missing something but I have found a case when planner is unoptimal. The planner knows next to nothing about optimizing FULL JOIN, and I would not recommend holding your breath waiting for it to get better about that, because there's basica

Re: [GENERAL] scenario with a slow query

2012-01-18 Thread Tom Lane
Volodymyr Kostyrko writes: > Maybe I'm missing something but I have found a case when planner is > unoptimal. The planner knows next to nothing about optimizing FULL JOIN, and I would not recommend holding your breath waiting for it to get better about that, because there's basically no demand f

[GENERAL] scenario with a slow query

2012-01-18 Thread Volodymyr Kostyrko
Hi all. Maybe I'm missing something but I have found a case when planner is unoptimal. # Creating table create table test_stat(id smallint, count smallint, date date); # Filling table, sorry for php $insert = $db->prepare('insert into test_stat (id, count, date) values (?, 1, to_timestamp(?