[TYPO3-core] Moving of elements (records) and pages in workspace

Martin Kutschker martin.kutschker-n0spam at no5pam-blackbox.net
Sun May 13 10:08:58 CEST 2007

Kasper Skårhøj schrieb:
> BTW:
> When I worked in Paris in March I tried to optimize their site. I found 
> that SQL statements in the backend selecting records in a workspace are 
> scanning the whole table! The reason is that they look up records like 
> this: "where (t3ver_oid=X OR uid=X)" Because it is an OR operation the 
> index table is NOT used at all and it cannot be used according to MySQLs 
> own explanation of how indexes work. It should say that both t3ver_oid 
> and uid is in the same index together. But even thought you could 
> imagine this to work, MySQL doesn't use it - hence it scans the whole 
> table in the Web>List module! I don't know yet how to solve this issue. 
> It is only found in the backend I believe.

I could only find one reference of (t3ver_oid=X OR uid=X) in the BE. 
It's in t3lib_tcemain::versionizeRecord and tries to get the next 
version number for a record.

Do I understand it correctly that t3ver_oid is empty for a just created 
versions (in LIVE) and t3ver_oid will hold the uid of the original row 
for all other versions of this record? I think in this case you add an 
extra field that will always carry a value: either the value of uid or 
t3ver_oid. This means that either a new record has to be UPDATEed after 
an INSERT or that we try to persuade Mysql to use sequences :-)


More information about the TYPO3-team-core mailing list