Bug #55181
closed
Added by Ingo Schmitt over 10 years ago.
Updated over 6 years ago.
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.
- Status changed from New to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
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?
- Estimated time changed from 0.50 h to 2.00 h
- Status changed from Resolved to Closed
Also available in: Atom
PDF