Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
6.2.X EE, 7.0.X, Master
-
7.0.x, 6.2.x
-
Committed
-
3
-
Performance
Description
JournalArticleFinder.findByExpirationDate() executes the below query every time it checks to expire articles (default 15):
SELECT * FROM JournalArticle WHERE (classNameId = 0) AND (status = 0) AND (expirationDate <= '2018-04-06 13:42:57');
As there is no index on classNameId, status and expirationDate, the database is executing a full table scan to find the entries. With a table size of ~500k, this takes around 10-20 seconds.
After adding the index, the query finishes almost instantly.
Attachments
Issue Links
- relates
-
LPE-16425 Add index to JournalArticle to speed up expiration checks
-
- Closed
-