Closed Bug 1163274 Opened 10 years ago Closed 10 years ago

Add indices for history tables

Categories

(Firefox for iOS :: Data Storage, defect)

All
iOS 8
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: rnewman, Assigned: rnewman)

References

Details

(Keywords: perf)

Attachments

(1 file)

47 bytes, text/x-github-pull-request
rnewman
: review+
Details | Review
We currently have none at all. That'll very rapidly bite us. I intend to fix this as part of, or immediately after, the schema changes in Bug 1163273.
Blocks: 1166812
Assignee: nobody → rnewman
Status: NEW → ASSIGNED
Summary: Add indices for database tables → Add indices for history tables
Attached file Pull req.
There's one commit near the end of this PR. I added only two explicit indices. All of the UNIQUE and PRIMARY KEY columns get an index for free. So I added two: * An index on should_upload, because otherwise that'll be a table scan for a very small set. Thinking about this, I should make this a partial index on should_upload = 1. * A compound index on visits.{siteID,date}, because we're always doing a join and datewise comparisons in the same query.
Attachment #8608880 - Flags: review?(wjohnston)
I made the index partial and rebased.
Reviewed in GH. c68aac4
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Attachment #8608880 - Flags: review?(wjohnston) → review+
Blocks: 1137462
Blocks: 1169322
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: