Search Postgresql Archives

Re: Runtime partition pruning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



select * from test where id between client_id-10 and client_id+10  and client_id=?; 

does not (it scans all partitions in parallel) . 
Is it expected?

Yes. But the below would work fine I expect since the planner would know a constant range for id. I would be very surprised if the optimizer had some condition rewrite rules to handle just the scenario you show.

 select * from test where id between ?-10 and ?+10  and client_id=?; 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux