[TYPO3-mvc] debug query

Stefano Cecere scecere at krur.com
Mon Oct 15 15:01:23 CEST 2012


Hi Claus

this time your solution was too complex for me.. i'm sorry and a bit 
embaressed :)

yes i would really like to bypass objects caches.. sometimes..

but luckily i could trace and solve the problem i had in the query 
builder /by uncommenting the //Debugs in Core :) (see my next thread


THANK YOU ANYWAY!!!
stefano

On 15/10/12 13:37, Claus Due wrote:
> Hi Stefano,
>
> This looks like the Object cache in Extbase - this is not circumvented by preventing caching of the action, as this cache is not related to USER_INT in any way.
>
> If you need to disable the object cache then the way to do that is to use a NullBackend. This can in some cases even increase performance ;) [1]
>
> Generally speaking, dependency injection and caching is a poor combination.
>
> If you want to debug a query generated by a Repository there is also a way to do that (although a little limited). Let me know if this is what you need - and if this hint is not enough: persistenceManager->parseQuery(Tx_Extbase_Persistence_QueryInterface $query).
>
> [1] http://www.typo3-media.com/blog/cachemgm-cache-log.html
>
> Cheers,
> Claus
>
>
> On Oct 15, 2012, at 1:17 PM, Stefano Cecere <scecere at krur.com> wrote:
>
>> hi
>> i'm having strange results in a (maybe complex or errated) query
>>
>> BUT i could not find an easy way to output the exact sql query code sent to mysql!
>>
>> $GLOBALS['TYPO3_DB']->store_lastBuiltQuery = 1;
>> $GLOBALS['TYPO3_DB']->debugOutput = true;
>> t3lib_div::devlog('SQL-Query', 'myext', 0, Array($GLOBALS['TYPO3_DB']->debug_lastBuiltQuery));
>>
>> always shows a cache:
>>
>> SELECT content FROM cf_extbase_object WHERE identifier = 'f1117553363716e400fe95c8a2374b5c7a4a5244' AND cf_extbase_object.expires >= 1350298714 LIMIT 1
>>
>> (BUT the action is NON CACHED!)
>>
>> i did also set $TYPO3_CONF_VARS['SYS']['sqlDebug'] = '2';
>> it gives LOTS og queris done.. but not mine (a part the cf_extbase_object one)
>>
>>
>> the ONLY way i could get the output of my query has been by uncommenting two //debug lines in /extbase/Classes/Persistence/Storage/Typo3DbBackend.php
>>
>> is it the best way?
>>
>> (quite tired now :)
>>
>>
>> -- --- ----- -------
>>
>> Stefano Cecere
>> KRUR studio - http://krur.com
>> _______________________________________________
>> TYPO3-project-typo3v4mvc mailing list
>> TYPO3-project-typo3v4mvc at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>


-- 

-- --- ----- -------

Stefano Cecere
KRUR studio - http://krur.com


More information about the TYPO3-project-typo3v4mvc mailing list