Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
Start date:
2011-06-11
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
hard
Sprint Focus:

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

prepared_statements_wip.patch (9.54 KB) prepared_statements_wip.patch Benni Mack, 2014-01-14 17:10

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #23374: Add support for prepared queriesClosedXavier Perseguers2010-08-14

Actions
Actions #1

Updated by Benni Mack almost 11 years ago

wip patch attached. Xavier will work on this in the next weeks.

Actions #2

Updated by Ernesto Baschny almost 11 years ago

  • Status changed from New to Accepted
  • Target version set to 6.2.0

+1 on that, thanks!

Actions #3

Updated by Felix Oertel almost 11 years ago

Do we have current status? ;)

Actions #4

Updated by Ingo Schmitt almost 11 years ago

  • Parent task set to #55179
Actions #5

Updated by Markus Klein over 10 years ago

  • Target version deleted (6.2.0)
  • Complexity set to hard

I took a closer look here.

To sum it up: quite hard

  1. Our DB API supports named parameters (:placeholder), but MySQL does not.
  2. The patch from Benni does not take DBAL into account at all. So this is a no go.
  3. The mysqli_stmt::get_result() (buffered result) method is only available with mysqlnd driver according to php docs.

We'd need to:

  1. Get DBAL straight for 6.2 (#50752)
  2. Implement a translation layer from named to positioned parameters, which would involve some sort of query parsing again.
  3. Make the PreparedStatement class independent of any database link, as the exact link used is different for every driver used in DBAL.
  4. 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+

Actions #6

Updated by Felix Oertel over 10 years ago

  • 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 ...

Actions #7

Updated by Gerrit Code Review over 10 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28231

Actions #8

Updated by Gerrit Code Review over 10 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28231

Actions #9

Updated by Gerrit Code Review over 10 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28231

Actions #10

Updated by Gerrit Code Review over 10 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28231

Actions #11

Updated by Gerrit Code Review over 10 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28231

Actions #12

Updated by Gerrit Code Review over 10 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28231

Actions #13

Updated by Gerrit Code Review over 10 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28231

Actions #14

Updated by Gerrit Code Review over 10 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28231

Actions #15

Updated by Gerrit Code Review over 10 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28231

Actions #16

Updated by Xavier Perseguers over 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #17

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF