Re: scans on table fail to be excluded by partition bounds

2019-06-26 Thread David Rowley
On Tue, 25 Jun 2019 at 05:31, Justin Pryzby wrote: > ts=# explain SELECT * FROM eric_enodeb_cell_metrics WHERE start_time BETWEEN > '2019-01-01 04:00' AND '2019-01-01 05:00' OR start_time BETWEEN '2019-01-02 > 04:00' AND '2019-01-02 05:00'; > Append (cost=36.04..39668.56 rows=12817 width=2730)

Re: scans on table fail to be excluded by partition bounds

2019-06-26 Thread Justin Pryzby
On Tue, Jun 25, 2019 at 10:48:01AM +, Steven Winfield wrote: > > ts=# explain SELECT * FROM eric_enodeb_cell_metrics WHERE start_time > > BETWEEN '2019-01-01 04:00' AND '2019-01-01 05:00' OR start_time BETWEEN > > '2019-01-02 04:00' AND '2019-01-02 05:00' > > Maybe it's because of the implici

RE: scans on table fail to be excluded by partition bounds

2019-06-25 Thread Steven Winfield
> ts=# explain SELECT * FROM eric_enodeb_cell_metrics WHERE start_time > BETWEEN '2019-01-01 04:00' AND '2019-01-01 05:00' OR start_time BETWEEN > '2019-01-02 04:00' AND '2019-01-02 05:00' Maybe it's because of the implicit usage of the local timezone when the strings are cast to (timestamp with

scans on table fail to be excluded by partition bounds

2019-06-24 Thread Justin Pryzby
I came across a poorly performing report with a subplan like this: ts=# explain SELECT * FROM eric_enodeb_cell_metrics WHERE start_time BETWEEN '2019-01-01 04:00' AND '2019-01-01 05:00' OR start_time BETWEEN '2019-01-02 04:00' AND '2019-01-02 05:00'; Append (cost=36.04..39668.56 rows=12817 wid