(08-10-2015, 06:13 AM)RobotXX Wrote: The problem persists and the topic is current. It can not be somehow easier to solve?
Yes:
1. When you've got hundreds of lines of SQL, use a raw query() instead of shoving it into the Query Builder.
2. Abstract some of that logic into the database itself (e.g.
IN(SELECT * FROM table_name) instead of
IN(...thousands of items ...)).