Bug #23216
closedQueries should only be parsed once
0%
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
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
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.