Project

General

Profile

Actions

Bug #102354

open

Extbase creates new prepared statement for each query

Added by Alexander Schnitzler about 1 year ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2023-11-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The TYPO3 DBAL abstraction creates prepared statements for each query for security reasons. Usually that's not a problem but with edge cases it is.
For example when bulk processing entities. Let's say you load 100 entities with one releation to another entity each from the db. The query to fetch the related entity is the same for all 100 entities but 100 prepared statements are created. That's not how prepared statements are supposed to be used. There should be one statement per Query and only the parameters should change. Somewhere inside the DBAL layer all prepared statements seem to be cached, so the RAM usage is growing heavily.

This could be solved by a runtime cache, caching prepared statements for each query and reusing the statements.

No data to display

Actions

Also available in: Atom PDF