Re: Missed query planner optimization: `n in (select q)` -> `n in (q)`

2022-06-12 Thread David G. Johnston
On Sun, Jun 12, 2022 at 2:47 PM Josh wrote: > > This was only possible because I was dealing with arrays though, and an > operation such as `in (select unnest...)` can be easily converted to `= > any(...)`. However for the general case, In the general case you don't have subqueries inside join

Missed query planner optimization: `n in (select q)` -> `n in (q)`

2022-06-12 Thread Josh
Hey y'all! So recently, I ran into an issue where a query I wrote wasn't using an index, presumably because what I was doing was too hard for the query planner to figure out. I've distilled the problem into its essence to the best of my ability, and found that it's because `select` seems to hin