Project

General

Profile

Actions

Bug #23216

closed

Queries should only be parsed once

Added by Xavier Perseguers over 14 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2010-07-17
Due date:
% Done:

0%

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

Description

When using remapping on some tables (typically with Oracle), queries are parsed twice. First time to rewrite it with remapped identifiers and second time, as for all queries, to properly quote them.

This is for sure inefficient and should be avoided. As the quoting mechanism works on the same parsed array as the remapping mechanism does, it should be possible to speed up the whole by using raw output of the remapped function as input for the quote function.

(issue imported from #M15160)


Files

15160_poc.diff (8.83 KB) 15160_poc.diff Administrator Admin, 2010-07-17 12:53
15160_v1.diff (28.2 KB) 15160_v1.diff Administrator Admin, 2010-07-17 19:50
Actions #1

Updated by Xavier Perseguers over 14 years ago

Attached patch is a proof-of-concept that it speeds up queries. The unit test makes sure both "normal" and "optimized" queries are still the same and outputs a debug message to show the performance gain:

Optimized run in 60.07950028393% of time of Normal for 500 loops

Actions #2

Updated by Xavier Perseguers over 14 years ago

_v1 is a real implementation. This should speed up SELECTs containing a table which is remapped (templavoila for instance).

But it has no effect if the SELECT does not contain a table with remapping information, that is it is neither slower nor quicker. Parameterized queries (#12668) would help here.

Actions #3

Updated by Xavier Perseguers over 14 years ago

Committed to trunk (rev. 36076)

Actions

Also available in: Atom PDF