Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
ElementsService optimization - switch to where-in statement when querying for elements with array of IDs #2937
I found a performance bottleneck in a project that includes quite a complicated document search page...
When querying for entries by using a large set of IDs, ~4000 or so, (eg.
This query was taking in the area of 2500ms to return a result.
When I experimented and switched this to a IN statement i.e.
... then the query time is dramatically improved to around 370ms. The total load is taken down from 10s to 2.5s.
For me this is a must keep update in the project I'm working on and I'd be interested to see if it could be included in the main project.