If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

2,500 "Suboptimal indexes for the SQL statement" emitted from nsDiskCacheDeviceSQL.cpp during linux64 debug testing

NEW
Unassigned

Status

()

Toolkit
Storage
P3
normal
a year ago
11 months ago

People

(Reporter: erahm, Unassigned, NeedInfo)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

> 884 WARNING: Suboptimal indexes for the SQL statement 0x7fdc6dc3d550 (http://mzl.la/1FuID0j).: file storage/mozStoragePrivateHelpers.cpp, line 114

This warning [1] shows up in the following test suites:

>    884 - desktop-test-linux64/debug-web-platform-tests-5 5

It shows up in 605 tests. A few of the most prevalent:

>    121 -        /html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html
>     25 -        /html/infrastructure/urls/resolving-urls/query-encoding/utf-16le.html
>     25 -        /html/infrastructure/urls/resolving-urls/query-encoding/windows-1252.html
>     25 -        /html/infrastructure/urls/resolving-urls/query-encoding/utf-8.html
>     25 -        /html/infrastructure/urls/resolving-urls/query-encoding/windows-1251.html
>      5 -        /html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute.html
>      5 -        /html/semantics/scripting-1/the-template-element/definitions/template-contents.html
>      4 -        /html/semantics/forms/form-submission-0/url-encoded.html
>      4 -        /html/semantics/document-metadata/the-base-element/base_multiple.html
>      4 -        /html/semantics/scripting-1/the-template-element/template-element/template-descendant-frameset.html

[1] https://hg.mozilla.org/mozilla-central/annotate/e78975b53563/storage/mozStoragePrivateHelpers.cpp#l114
https://treeherder.mozilla.org/#/jobs?repo=try&revision=064ea3fd1dfa
Duplicate of this bug: 1293377
Duplicate of this bug: 1293376
Duplicate of this bug: 1293374
The majority of these appear to be from two SQL statements in nsDiskCacheDeviceSQL.cpp [1]:

>  1258 WARNING: Suboptimal indexes for the SQL statement `SELECT ClientID, ItemType FROM moz_cache WHERE Key = ? ORDER BY LastFetched DESC, LastModified DESC;` [1 sort operation(s)] (http://mzl.la/1FuID0j).: file storage/mozStoragePrivateHelpers.cpp, line 114
>  1258 WARNING: Suboptimal indexes for the SQL statement `SELECT ns.ClientID, ns.ItemType FROM  moz_cache_namespaces AS ns JOIN moz_cache_groups AS groups  ON ns.ClientID = groups.ActiveClientID WHERE ns.NameSpace <= ?1 AND ?1 GLOB ns.NameSpace || '*' ORDER BY ns.NameSpace DESC, groups.ActivateTimeStamp DESC;` [1 sort operation(s)] (http://mzl.la/1FuID0j).: file storage/mozStoragePrivateHelpers.cpp, line 114

Looks like dcamp added these back in 2008 in bug 442813. Dave would you mind taking a look at this or redirecting to someone more appropriate? The general rule here is either it's possibly a perf hit and we should add an index or we can annotate the statement to avoid the warning.

[1] https://dxr.mozilla.org/mozilla-central/rev/e78975b53563d80c99ebfbdf8a9fbf6b829a8a48/netwerk/cache/nsDiskCacheDeviceSQL.cpp#1275-1283
Flags: needinfo?(dcamp)
Summary: 900 instances of "Suboptimal indexes for the SQL statement 0x7fdc6dc3d550 (http://mzl.la/1FuID0j)." emitted from storage/mozStoragePrivateHelpers.cpp during linux64 debug testing → 2,500 "Suboptimal indexes for the SQL statement" emitted from nsDiskCacheDeviceSQL.cpp during linux64 debug testing

Updated

11 months ago
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.