[TYPO3-core] RFC: improving index of sys_template

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Wed Oct 11 17:06:58 CEST 2006


Martin Kutschker schrieb:
> Martin Kutschker schrieb:
> 
  > After same investigation (using logged EXPLAIN during a session) I
> suggest the following indices:
> 
> # changed
> create index parent on pages (pid,sorting);
> create index parent on tt_content (pid,sorting);
> 
> The avoid a filesort for typical queries on pages and tt_content.
> 
> # new
> create index record on sys_log (recuid,uid);
> 
> The last index is only used in history/undo but avoids a scan of the 
> complete sys_log table (history has WHERE recuid=<id> SORT BY <uid>).

# new
create index recordidentAS on sys_history (tablename,recuid,tstamp);

This one is for Web>Pages/alt_doc.php which also reads the history 
(avoidign filesort again).

Masi



More information about the TYPO3-team-core mailing list