Closed Bug 1948713 Opened 8 months ago Closed 8 months ago

Stop adding `bugs.creation_ts IS NOT NULL` to every search query

Categories

(bugzilla.mozilla.org :: Search, enhancement)

Production
enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: glob, Assigned: glob)

Details

Attachments

(1 file)

20 years ago bug 292544 added a clause was added to every search query for bugs.creation_ts IS NOT NULL to prevent a race condition where a bug was visible in the bugs table before relevant entries in the bug_group_map table were created. This was before Bugzilla supported transactions.

However, for a very long time bugs have been created along with their groups within a database transaction; this race condition doesn't exist.

Due to every bug having a non-NULL creation_ts, this query is effectively a full table scan even with an index (the index matches every row).

We should remove this clause.

Authored by https://github.com/globau
https://github.com/mozilla-bteam/bmo/commit/426d2e6ec05b7477552d82850345c868c1bfeac6
[master] Bug 1948713 - Stop adding bugs.creation_ts IS NOT NULL to every search query

Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: