Feature #27372
closed
Epic #55070: Workpackages
Epic #55065: WP: Overall System Performance (Backend and Frontend)
Task #55179: Optimize SQL Performance
Execute native prepared queries in t3lib_DB
Added by Steffen Gebert over 13 years ago.
Updated about 7 years ago.
Category:
Database API (Doctrine DBAL)
Description
Currently, t3lib_DB
does not execute prepared queries, even when the prepared functions are used. All queries are transformed to "normal" MySQL queries. Only DBAL takes advantage of using them ATM.
This should be fixed for 4.6 I think.
Files
wip patch attached. Xavier will work on this in the next weeks.
- Status changed from New to Accepted
- Target version set to 6.2.0
Do we have current status? ;)
- Parent task set to #55179
- Target version deleted (
6.2.0)
- Complexity set to hard
I took a closer look here.
To sum it up: quite hard
- Our DB API supports named parameters (:placeholder), but MySQL does not.
- The patch from Benni does not take DBAL into account at all. So this is a no go.
- The mysqli_stmt::get_result() (buffered result) method is only available with mysqlnd driver according to php docs.
We'd need to:
- Get DBAL straight for 6.2 (#50752)
- Implement a translation layer from named to positioned parameters, which would involve some sort of query parsing again.
- Make the PreparedStatement class independent of any database link, as the exact link used is different for every driver used in DBAL.
- Emulate a buffered result, if mysqlnd is not available, to make the PreparedStatement::seek() function work
So IMHO this is a topic for 6.3+
- Assignee set to Xavier Perseguers
- Target version set to 6.2.0
- TYPO3 Version changed from 4.6 to 6.2
Xavier will work on this and tries to push a WIP patch this evening. In the morning I will have a look and possibly pick up ...
- Status changed from Accepted to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF