A big improvement for preparedStatements could be get when there would be a setting in the DataMapper:fetchRelated() (getPreparedQuery) to enable preparedStatements for fetching the relations because the queries would mostly be the same and only differ in the uid.
#2 Updated by Marc Bastian Heinrichs over 6 years ago
Xavier Perseguers wrote:
From the implementation of prepared statement I've seen, I have the feeling the prepared statement is recreated for each execution. If I'm correct, and to get most out of it, it should really be reused instead.
Oh, yes, I think you are right. At the moment there is absolutely no improvement, if it is enabled in the query settings. The query object will be recreated every time instead of reusing an already created one.
Felix this is not fixed in the query cache patch, is it?
#5 Updated by Christian Kuhn over 3 years ago
- Status changed from New to Closed
see https://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Database/Statement/Index.html#re-use-prepared-statement on how to re-use prepared statements.