Remove 'group by' from url completion query.

This seemed to have a significant performance impact. Removing it means
that instead of just seeing the most recent atime for a given url, you
will see multiple entries.
This commit is contained in:
Ryan Roden-Corrent 2017-06-02 07:47:28 -04:00
parent c297f047d2
commit a01c76db54
2 changed files with 4 additions and 2 deletions

View File

@ -75,9 +75,9 @@ def url():
columns_to_filter=[0, 1]))
timefmt = config.get('completion', 'timestamp-format')
select_time = "strftime('{}', max(atime), 'unixepoch')".format(timefmt)
select_time = "strftime('{}', atime, 'unixepoch')".format(timefmt)
hist_cat = sqlcategory.SqlCategory(
'History', sort_order='desc', sort_by='atime', group_by='url',
'History', sort_order='desc', sort_by='atime',
filter_fields=['url', 'title'],
select='url, title, {}'.format(select_time), where='not redirect')
model.add_category(hist_cat)

View File

@ -306,7 +306,9 @@ def test_url_completion(qtmodeltester, config_stub, web_history, quickmarks,
"History": [
('https://github.com', 'https://github.com', '2016-05-01'),
('https://python.org', 'Welcome to Python.org', '2016-03-08'),
('https://python.org', 'Welcome to Python.org', '2016-02-08'),
('http://qutebrowser.org', 'qutebrowser', '2015-09-05'),
('https://python.org', 'Welcome to Python.org', '2014-03-08'),
],
})