Closed
Bug 1556009
Opened 6 years ago
Closed 3 years ago
Use new window functions to provide better position fixing in PlacesDBUtils
Categories
(Toolkit :: Places, task, P2)
Tracking
()
RESOLVED
FIXED
109 Branch
| Tracking | Status | |
|---|---|---|
| firefox109 | --- | fixed |
People
(Reporter: standard8, Assigned: mak)
Details
Attachments
(1 file)
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.
| Reporter | ||
Updated•6 years ago
|
Priority: P3 → P2
Updated•3 years ago
|
Severity: normal → S3
| Assignee | ||
Comment 1•3 years ago
|
||
Updated•3 years ago
|
Assignee: nobody → mak
Status: NEW → ASSIGNED
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/3a3942cde8aa
Use a window function and update-from to fix bookmark indices. r=scunnane
Comment 3•3 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 3 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
•