Re: [HACKERS] planner doesn't use bitmap index

2015-10-29 Thread Pavel Stehule
2015-10-29 19:20 GMT+01:00 Tom Lane : > Pavel Stehule writes: > > -- I was surprised, so following query can use index > > postgres=# explain select a from test2 where a at time zone > > 'America/Santiago' >= now() at time zone 'America/Santiago' ; > > Q

Re: [HACKERS] planner doesn't use bitmap index

2015-10-29 Thread Tom Lane
Pavel Stehule writes: > -- I was surprised, so following query can use index > postgres=# explain select a from test2 where a at time zone > 'America/Santiago' >= now() at time zone 'America/Santiago' ; > QUERY > PLAN > ═══════════â•

[HACKERS] planner doesn't use bitmap index

2015-10-29 Thread Pavel Stehule
Hi There is interesting query on stackoverflow http://stackoverflow.com/questions/33418157/query-too-slow-in-postgresql-in-table-with-12m-rows - and it looks like planner issue. I have empty tables test1 and test2 set enable_seqscan to off; create table test1(a int, b int); create index on test1