[TYPO3-dev]  Index of table sys_refindex
    Martin Kutschker 
    Martin.Kutschker at n0spam-blackbox.net
       
    Fri Nov  3 14:03:54 CET 2006
    
    
  
Hi!
The mysql definition has the following index:
lookup_string (ref_table,ref_string(199))
Why? ref_string is only 200 chars long, so the index is only one byte shorter.
I only noticed because on 4.0.2 it did break on Postgresql 7.4. DBAL 
doesn't remove the length restriction which is not supported by PostgreSQL. 
But PostgreSQL allows indexes on expressions:
create index lookup_string on sys_refindex substring(ref_string from 1 for 
199) // ANSI-SQL (supported by PostgreSQL)
create index lookup_string on sys_refindex substr(ref_string,1,2) // PostgreSQL
Masi
    
    
More information about the TYPO3-dev
mailing list