Actions
Feature #96275
closedAdd index to speed up sys_refindex queries
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Performance
Target version:
-
Start date:
2021-12-07
Due date:
% Done:
0%
Estimated time:
PHP Version:
Tags:
Complexity:
no-brainer
Sprint Focus:
Description
During profiling of DataHandler I noticed a lot of queries like this one:
SELECT `hash` FROM `sys_refindex` WHERE (`tablename` = 'foo_bar') AND (`recuid` = 138) AND (`workspace` = 0)
They were taking quite some time to run with a largish sys_refindex table (1M rows). It turns out there are no indexes supporting this common query, so adding an index speeds up this type of query quite a bit!
CREATE TABLE `sys_refindex` (
KEY `table_rec_ws` (`tablename`,`recuid`,`workspace`)
);
Files
Actions