Hacker News new | ask | show | jobs
by rosser 5129 days ago
I don't remember specifically, but I believe it was in the thousands to low tens of thousands of rows. It's also not consistent. I've seen larger IN() clauses that never have a problem, and smaller ones that consistently do. It's been on my very low priority to-do list to put together some demo cases for the mailing lists, because overnight to < 4s just from that little refactor isn't the greatest...
1 comments

Are we talking about IN clauses that contain a correlated subquery or something the optimizer would have a hard time determining was independent of outer context?
PostgreSQL is able to convert correlated subqueries with IN () clauses into joins in most cases. My guess is that it could have been two queries refactored into one.