Use a specialised count query for browsing tables/views

For queries built from a table and filters, use a specialised count query
that only takes into account the where part of the statement. This will
speed-up the Browse Data tab for big tables.

See issue #1666
This commit is contained in:
mgrojo
2018-12-19 23:58:30 +01:00
committed by Martin Kleusberg
parent b4667b6bac
commit cfdf68d562
6 changed files with 47 additions and 28 deletions

View File

@@ -34,7 +34,7 @@ public:
Cache & cache_data
);
void setQuery (QString);
void setQuery (QString new_query, QString newCountQuery = QString());
void triggerRowCountDetermination (int token);
@@ -77,6 +77,7 @@ private:
mutable std::condition_variable cv;
QString query;
QString countQuery;
mutable std::future<void> row_counter;