Page MenuHomePhabricator

Add index on oi_timestamp
Closed, ResolvedPublic


A comment in ImageListPager (used by Special:ListFiles) bemoans the lack of an index on oi_timestamp analogous to the existing index on img_timestamp, and it awkwardly disables sorting by timestamp when the "Include old versions of files" form field is checked. Timestamp is ordinarily the default sort order for this special page, so the effect is for the sort order to be silently changed when the checkbox is clicked. I'm filing this task to raise awareness of this issue.

The table has around 10M rows on commonswiki.

T271530 also proposes a change to oldimage indexes.

Event Timeline

Change 682233 had a related patch set uploaded (by Ladsgroup; author: Ladsgroup):

[mediawiki/core@master] Add index on oldimage.oi_timestamp

Change 682233 merged by jenkins-bot:

[mediawiki/core@master] Add index on oldimage.oi_timestamp

Ladsgroup claimed this task.

I filed T284221: Schema change for adding oi_timestamp on oldimage table for deployment in production (for our DBAs). This is done.