Last modified: 2014-06-04 10:36:32 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T68111, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 66111 - watchlist needs a surrogate primary key
watchlist needs a surrogate primary key
Status: NEW
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.24rc
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-04 05:05 UTC by Sean Pringle
Modified: 2014-06-04 10:36 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sean Pringle 2014-06-04 05:05:51 UTC
CREATE TABLE watchlist (
  wl_user int(5) unsigned NOT NULL DEFAULT '0',
  wl_namespace int(11) NOT NULL DEFAULT '0',
  wl_title varbinary(255) NOT NULL DEFAULT '',
  wl_notificationtimestamp varbinary(14) DEFAULT NULL,
  UNIQUE KEY wl_user (wl_user,wl_namespace,wl_title),
  KEY namespace_title (wl_namespace,wl_title)
) ENGINE=InnoDB DEFAULT CHARSET=binary;

InnoDB uses the unique key wl_user as a primary key. Since PK is clustered, secondary indexes contain hidden copies of the PK columns, potentially making them quite large.

Bug 66089 adds another secondary index, wl_user_notificationtimestamp, so it's time to consider adding a surrogate primary key wl_id.
Comment 1 Sean Pringle 2014-06-04 05:08:59 UTC
This may have some effect on MariaDB watchlist query execution plans such as different use of extended keys or Index Condition Pushdown. Testing is in progress on an enwiki slave.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links