Project

General

Profile

Actions

Bug #55181

closed

Epic #55070: Workpackages

Epic #55065: WP: Overall System Performance (Backend and Frontend)

Task #55179: Optimize SQL Performance

Speedup domain redirection lookup

Added by Ingo Schmitt over 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Performance
Target version:
Start date:
2014-01-20
Due date:
% Done:

100%

Estimated time:
2.00 h
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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.

Actions #1

Updated by Gerrit Code Review about 10 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

Actions #2

Updated by Ingo Schmitt about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #3

Updated by Steffen Müller about 10 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?

Actions #4

Updated by Ingo Schmitt about 10 years ago

  • Estimated time changed from 0.50 h to 2.00 h
Actions #5

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF