summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/sql/kernel/kernel.pro
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2018-01-08 15:48:01 +0100
committerJani Heikkinen <jani.heikkinen@qt.io>2018-02-08 18:24:48 +0000
commit6c6ace9d23f90845fd424e474d38fe30f070775e (patch)
treedef1c304f95c6ea902448fe66d09f15da5f1e7de /tests/benchmarks/sql/kernel/kernel.pro
parent41bcb31ab9538328ca05efcb4a01569c9803198c (diff)
psql: Improve performance of record()v5.10.1
In order to save having to always run a query to get the tablename for a known oid then we cache the result on the driver side. The oid stays the same while the table exists, so only on dropping it would it change. Recreating the table causes it to get a new oid, so there is no risk of the old one being associated with the wrong table when this happens, if the driver is still open at that point. The benchmark added shows the improvement from the previous code, before the results for PostgreSQL was: RESULT : tst_QSqlRecord::benchmarkRecord():"0_QPSQL@localhost": 259 msecs per iteration (total: 259, iterations: 1) whereas now it is: RESULT : tst_QSqlRecord::benchmarkRecord():"0_QPSQL@localhost": 0.000014 msecs per iteration (total: 59, iterations: 4194304) Task-number: QTBUG-65226 Change-Id: Ic290cff719102743da84e2044cd23e540f20c96c Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Robert Szefner <robertsz27@interia.pl> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/benchmarks/sql/kernel/kernel.pro')
-rw-r--r--tests/benchmarks/sql/kernel/kernel.pro1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/benchmarks/sql/kernel/kernel.pro b/tests/benchmarks/sql/kernel/kernel.pro
index f907feeeac..63887daf5f 100644
--- a/tests/benchmarks/sql/kernel/kernel.pro
+++ b/tests/benchmarks/sql/kernel/kernel.pro
@@ -1,3 +1,4 @@
TEMPLATE = subdirs
SUBDIRS = \
qsqlquery \
+ qsqlrecord