Skip to content
Browse files

[db-manager] Query elapsed time include fetch time

The values reported were always lower than
the actual time for query and fetch.

I guess that those values are useful when you
are testing queries and fine-tuning them,
so the actual value should include fetching
  • Loading branch information
elpaso committed Oct 3, 2018
1 parent f4bc24c commit b8c21b038721610557878f5484182652a69689df
Showing with 3 additions and 3 deletions.
  1. +3 −3 python/plugins/db_manager/db_plugins/
@@ -192,9 +192,7 @@ def __init__(self, db, sql, parent=None):

t = QTime()
c = self.db._execute(None, str(sql))
self._secs = t.elapsed() / 1000.0
del t
c = self.db._execute(None, sql)

self._affectedRows = 0
data = []
@@ -216,7 +214,9 @@ def __init__(self, db, sql, parent=None):
# commit before closing the cursor to make sure that the changes are stored
self._secs = t.elapsed() / 1000.0
del c
del t

def secs(self):
return self._secs

0 comments on commit b8c21b0

Please sign in to comment.
You can’t perform that action at this time.