[TYPO3-dev] rfc: minor db change for TS templates

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Thu Oct 5 11:36:59 CEST 2006


R. van Twisk schrieb:
> Dmitry Dulepov wrote:
> 
>> Hi!
>>
>> Martin Kutschker wrote:
>>  
>>
>>> The EXPLAIN returns the same. But of course you're right Mysql should 
>>> not read the row to handle the WHERE. But it seems to work on the 
>>> index alone you have to use only indexed columns in the SELECT. Here 
>>> we use *, so AFAIKS Mysql does no further optimization.
>>>     
>>
>>
>> Yes but if all fields are in the index, it means that mysql need not 
>> to look to actual rows to find the right row. Looking in the index is 
>> much faster.
>>
>>  
>>
>>> My conclusio: In theory your index should be faster, but in practice 
>>> it isn't.
>>>     
>>
>>
>> I think it is possible to evaluate only by runing dedicated test.
>>
>>   
> 
> Since the number of columns is small,
> mysql might even decide not to use a index at all, and simply load the 
> complete table in memory.

I might do it, but if it does it didn't tell me via the EXPLAIN.

But as we're really talking about a usually small table it shouldn't matter 
too much.

Masi




More information about the TYPO3-dev mailing list