Closed
Bug 1556010
Opened 5 years ago
Closed 2 years ago
Use new window functions to provide better position fixing in reorderChildren
Categories
(Toolkit :: Places, task, P2)
Tracking
()
RESOLVED
FIXED
109 Branch
Tracking | Status | |
---|---|---|
firefox109 | --- | fixed |
People
(Reporter: standard8, Assigned: mak)
References
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
From the review comments in bug 1540669:
For PlacesDBUtils we could probably use PARTITION BY to update ALL the bookmarks:
WITH positions(id, pos, seq) AS (
SELECT id, position AS pos,(row_number() OVER (PARTITION BY parent ORDER BY position)) - 1 AS seq
FROM moz_bookmarks
)
UPDATE moz_bookmarks
SET position = (SELECT seq FROM positions WHERE positions.id = moz_bookmarks.id)
WHERE id IN ( SELECT id FROM positions WHERE seq <> pos);
Just note that using the row_number() window function we can likely fix all of the indexing problems we have around.
We should see if we can apply this to reorderChildren().
Updated•2 years ago
|
Severity: normal → S3
Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
Assignee: nobody → mak
Status: NEW → ASSIGNED
Assignee | ||
Updated•2 years ago
|
Pushed by mak77@bonardo.net: https://hg.mozilla.org/integration/autoland/rev/782a1acfd6fd Use Sqlite window functions to provide better position fixing in reorderChildren. r=Standard8
Comment 3•2 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
status-firefox109:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•