Bug #55181
closedEpic #55070: Workpackages
Epic #55065: WP: Overall System Performance (Backend and Frontend)
Task #55179: Optimize SQL Performance
Speedup domain redirection lookup
100%
Description
The get sysDomainCache detects if a domain is redirected by issuing the query:
Count: 125 Time=0.00s (0s) Lock=0.00s (0s) Rows=262.0 (32750), webuser[webuser]@localhost
SELECT pid, domainName, forced FROM sys_domain WHERE redirectTo='S' AND sys_domain.hidden=N ORDER BY sorting ASC
TypoScriptFrontendController->getSysDomainCache()
There is no Database key on hidden and redirectTo. By setting a index the execution would be speeded up.
Updated by Gerrit Code Review almost 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27167
Updated by Ingo Schmitt almost 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 84543545ac27914e02f5e2fc66fb085dc6447cd6.
Updated by Steffen Müller almost 11 years ago
I went through the query and tried to reproduce the speed enhancements with approx. 3000 rows of sample data.
The index seems never to be used:
mysql> EXPLAIN SELECT pid, domainName, forced FROM sys_domain WHERE redirectTo='http://foobar/' AND hidden=0 ORDER BY sorting ASC; +----+-------------+------------+------+-------------------+------+---------+------+------+-----------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+------------+------+-------------------+------+---------+------+------+-----------------------------+ | 1 | SIMPLE | sys_domain | ALL | redirectTo_hidden | NULL | NULL | NULL | 3032 | Using where; Using filesort | +----+-------------+------------+------+-------------------+------+---------+------+------+-----------------------------+ 1 row in set (0.00 sec)
Can you reproduce this or otherwise provide some more details about your test setup where the index is used?
Updated by Ingo Schmitt almost 11 years ago
- Estimated time changed from 0.50 h to 2.00 h
Updated by Riccardo De Contardi over 7 years ago
- Status changed from Resolved to Closed