Re: Query pattern tha Postgres doesn't handle well

2018-02-24 Thread Tom Lane
Greg Stark writes: > At my day job I've been doing a fair amount of routine query and > schema optimization and I've noticed on particular query shape that > has repeatedly caused problems, and it's one we've talked about > before. > select * from table where simple-restriction 0 OR (complex-subq

Query pattern tha Postgres doesn't handle well

2018-02-24 Thread Greg Stark
At my day job I've been doing a fair amount of routine query and schema optimization and I've noticed on particular query shape that has repeatedly caused problems, and it's one we've talked about before. select * from table where simple-restriction 0 OR (complex-subquery) For example something l