Closed Bug 635956 Opened 13 years ago Closed 5 years ago

Fennec - SQL warning during form entry

Categories

(Firefox for Android Graveyard :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(fennec-)

RESOLVED WONTFIX
Tracking Status
fennec - ---

People

(Reporter: dougt, Unassigned)

References

()

Details

When I enter a form (such as the bugzilla quick search), I see the following line on stderr:

-134498272[7f91eae14040]: Initialized statement 'SELECT value, ROUND( timesUsed / MAX(1.0, (lastUsed - firstUsed) / :timeGroupingSize) * MAX(1.0, :maxTimeGroupings - (:now - lastUsed) / :timeGroupingSize) * MAX(1.0, :agedWeight * (firstUsed < :expiryDate)) / :bucketSize , 3) AS frecency, 1 AS boundaryBonuses FROM moz_formhistory WHERE fieldname=:fieldname AND (value LIKE :valuePrefix ESCAPE '/') ORDER BY ROUND(frecency * boundaryBonuses) DESC, UPPER(value) ASC' (0x7f91d8c76d48)

-134498272[7f91eae14040]: sqlite3_trace on 7f91da458140 for 'SELECT value, ROUND( timesUsed / MAX(1.0, (lastUsed - firstUsed) / 604800000000.0) * MAX(1.0, 25 - (1.298403921739e+15 - lastUsed) / 604800000000.0) * MAX(1.0, 2 * (firstUsed < 1.282851921739e+15)) / 1 , 3) AS frecency, 1 AS boundaryBonuses FROM moz_formhistory WHERE fieldname='quicksearch' AND (value LIKE '1%' ESCAPE '/') ORDER BY ROUND(frecency * boundaryBonuses) DESC, UPPER(value) ASC'

-134498272[7f91eae14040]: Resetting statement: 'SELECT value, ROUND( timesUsed / MAX(1.0, (lastUsed - firstUsed) / :timeGroupingSize) * MAX(1.0, :maxTimeGroupings - (:now - lastUsed) / :timeGroupingSize) * MAX(1.0, :agedWeight * (firstUsed < :expiryDate)) / :bucketSize , 3) AS frecency, 1 AS boundaryBonuses FROM moz_formhistory WHERE fieldname=:fieldname AND (value LIKE :valuePrefix ESCAPE '/') ORDER BY ROUND(frecency * boundaryBonuses) DESC, UPPER(value) ASC'

-134498272[7f91eae14040]: WARNING: 1 sort operation has occurred for the SQL statement '0x7f91d8c76d48'.  See https://developer.mozilla.org/En/Storage/Warnings details.: file /builds/mozilla-central/storage/src/mozStoragePrivateHelpers.cpp, line 139

WARNING: 1 sort operation has occurred for the SQL statement '0x7f91d8c76d48'.  See https://developer.mozilla.org/En/Storage/Warnings details.: file /builds/mozilla-central/storage/src/mozStoragePrivateHelpers.cpp, line 139
tracking-fennec: --- → ?
this cannot clearly use any kind of index
ORDER BY ROUND(frecency * boundaryBonuses) DESC, UPPER(value) ASC

I suggest adding the /* do not warn (bug 635956) */ comment to the SQL query so that it will stop warning, and leave the bug open in the proper component (I guess Satchel) to try finding a way to use indices, maybe through some stored frecency or a temp table.

I'm not sure that rewriting Satchel frecency is in scope for a near release
tracking-fennec: ? → ---
Sorry I wrongly cleared the blocking request Doug set
tracking-fennec: --- → ?
tracking-fennec: ? → 2.0-
Closing all opened bug in a graveyard component
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.