Affects Version/s: 7.2.X, 7.3.X, Master
Component/s: Web Content > Web Content Administration
- Set up a portal
- Create a new site
- Generate 100000 basic web contents
- Create a new structure (add some dummy fields)
- Create a few web contents based on the structure
- Execute the following Groovy script, with replaced structureKey, companyId, groupId:
Expected behavior: the query is executed relatively quickly, in less than 1 second.
Actual behavior: the query takes a few seconds to finish.
- When you debug into JournalArticleFinderImpl.doFindByC_G_F_C_A_V_T_D_C_S_T_D_R(..), you can read the query from the sql variable. You can see that it joins to JournalArticleLocalization table, even though none of its fields are actually used in the where conditions or in the ORDER BY statement.
LPS-109979already solved a similar problem, just with other queries. My guess is that the same would be possible for these complex queries as well.