зеркало из https://github.com/mozilla/gecko-dev.git
Bug 559163 - Don't select from slow indexless views for just one item [r=mconnor]
Just select from moz_places instead of _view where data might be slightly stale but good enough.
This commit is contained in:
Родитель
d5a98d02e2
Коммит
152c9df466
|
@ -834,7 +834,7 @@ BookmarksStore.prototype = {
|
|||
this._log.trace("Creating SQL statement: _frecencyStm");
|
||||
let stm = Svc.History.DBConnection.createStatement(
|
||||
"SELECT frecency " +
|
||||
"FROM moz_places_view " +
|
||||
"FROM moz_places " +
|
||||
"WHERE url = :url");
|
||||
this.__defineGetter__("_frecencyStm", function() stm);
|
||||
return stm;
|
||||
|
|
|
@ -109,10 +109,10 @@ HistoryStore.prototype = {
|
|||
this._log.trace("Creating SQL statement: _visitStm");
|
||||
let stm = this._db.createStatement(
|
||||
"SELECT visit_type type, visit_date date " +
|
||||
"FROM moz_historyvisits_view " +
|
||||
"FROM moz_historyvisits " +
|
||||
"WHERE place_id = (" +
|
||||
"SELECT id " +
|
||||
"FROM moz_places_view " +
|
||||
"FROM moz_places " +
|
||||
"WHERE url = :url) " +
|
||||
"ORDER BY date DESC LIMIT 10");
|
||||
this.__defineGetter__("_visitStm", function() stm);
|
||||
|
@ -123,7 +123,7 @@ HistoryStore.prototype = {
|
|||
this._log.trace("Creating SQL statement: _urlStm");
|
||||
let stm = this._db.createStatement(
|
||||
"SELECT url, title, frecency " +
|
||||
"FROM moz_places_view " +
|
||||
"FROM moz_places " +
|
||||
"WHERE id = (" +
|
||||
"SELECT place_id " +
|
||||
"FROM moz_annos " +
|
||||
|
|
Загрузка…
Ссылка в новой задаче