[TYPO3-dev] index on cache_hash ident field

Krystian Szymukowicz t33k.RE.MO.VE at RE.MO.VE.prolabium.com
Wed Dec 2 21:56:20 CET 2009


Rupert Germann pisze:
> Krystian Szymukowicz schrieb:
>> I would not call myself and database expert so I'd like to ask you:
>> should not there be an index created on filed "ident" in table 
>> "cache_hash" ?
>>
>> Typical use of ident in cache hash would be
>> SELECT * FROM cache_hash WHERE ident = 'foobar'
>> DELETE FROM cache_hash WHERE ident = 'foobar'
>>
>> so the index on 'ident' would play his part quite well here, I think.
>>
>>
>> With hundred thousands records simple "DELETE FROM cache_hash WHERE 
>> ident = 'foobar'" create quite huge time lag (about minute).
>>
>> What's your opinion?
> 
> in theory there should be an index, but practical this field is not used 
> in the core - only by some extensions (e.g. automaketemplate).
> but AFAIK there's no select query on this field.
> So I see no problem here.
> 


Yes. In the core there is no SELECT and DELETE on this field.

But in TYPO3 documentation there is a statement that cache_hash is a 
*universal* cache table which can be used by extensions too (this is my 
case). I think that if it is universal it should be prepared for SELECT 
and DELETE.

And what is the sense of this field if it cannot be used effectively by 
extensions and is not used in core anyway?


-- 
grtz
Krystian Szymukowicz




More information about the TYPO3-dev mailing list