I’ve been operating under the assumption that QueryOfQuery is extremely slow and that a far faster alternative is to use QueryFilter. I’m basing this assumption off of the official Lucee developer guide about this very topic
However I noticed that when I used QueryFilter in my code it was painfully slow. On a hunch I tried using QoQ instead, and it ran in close to one third of the time. Since this was the exact opposite of what the Lucee developer guide said, I went back to that guide decided to run the test found there on my own.
Running the test as is from the guide yields the same results, QoQ performs about 3 times slower than query filter for a query of 2 records.
Below are the results from that test, when run locally.
When I swap out the sample 2 record query for one with a moderate 215 records, the results completely swap
Now the QueryFilter is performing about 3 times slower than QueryFilter.
Has anyone else experienced this? I don’t mind that query of query is faster, in fact I prefer it, but seems strange there’s an entire article in the Lucee docs specifically stating the opposite, when that seems to be true only for extremely tiny queries.
Lucee: Lucee 220.127.116.11-SNAPSHOT
OS: Windows 10 (10.0) 64bit
Java: 1.8.0_144 (Oracle Corporation) 64bit