[TYPO3-core] RFC: performance improvemenets for database

Ingmar Schlecht ingmar at typo3.org
Tue Jan 30 11:13:59 CET 2007


Hi Dmitry,

thanks for the patch, I just tested it and it works just fine.

+1

cheers
Ingmar

Dmitry Dulepov schrieb:
> Hi!
> 
> Ingmar Schlecht wrote:
>> does anybody else have the problem I described in the quoted mail?
>>
>> Ingmar Schlecht wrote:
>>> When I go to Update Database in the Install Tool, it always suggests...
>>>
>>>      ALTER TABLE pages DROP KEY parent;
>>>     ALTER TABLE pages ADD KEY parent (pid, sorting);
>>>     ALTER TABLE tt_content DROP KEY parent;
>>>     ALTER TABLE tt_content ADD KEY parent (pid, sorting);
>>>
>>> ....no matter how often I click "Write to database", it stays there.
> 
> Yes, the problem exists as well as two other small problems:
> - parent index is still defined as (pid) in t3lib/stddb. This is not
> critical because it is overriden from cms extension but better be
> consistent
> - be_users.lang is defined as varchar(2), which always becomes char(2)
> in mysql. Here is what mysql manual says: "MySQL may silently change the
> type of a CHAR  or VARCHAR column at table creation time" [2] and
> "VARCHAR columns with a length less than four are changed to CHAR" [1].
> And about "CHAR" type: "When CHAR  values are stored, they are
> right-padded with spaces to the specified length. When CHAR values are
> retrieved, trailing spaces are removed." [2] To avoid never disappearing
> warning in COMPARE, we need to change that column as well.
> 
> To fix it all (including problem you mentioned) I recommend the attached
> patch :)
> 
> Refs:
> [1] http://dev.mysql.com/doc/refman/4.1/en/silent-column-changes.html
> [2] http://dev.mysql.com/doc/refman/4.1/en/char.html
> 
> 


More information about the TYPO3-team-core mailing list