Brion, et al. As far as I understand, the watch list query has a date/time range condition on the revisions table (which is VERY big). Most DB servers don't use non-clustered indexes for range conditions. There are two ways to solve this: 1. Change the revision table clustered index to timestamp (and primary key to timestamp+ID). The ID should be kept only for timestamp collisions. 2. Save for each user in his watch list the cut-off revision ID for each article.
I think that #1 is the easiest and will give significant improvement.
Meir :->
-----Original Message----- From: Brion Vibber [mailto:brion@pobox.com] Sent: Thursday, January 15, 2004 8:13 PM To: Mendelovich Meir Cc: 'Peter Gervai' Subject: Re: Wikitech-l Digest, Vol 6, Issue 45
On Jan 15, 2004, at 05:20, Mendelovich Meir wrote:
Brion, Small question: What is the primary key of the revision histroy table? Is it the timestamp? Is it clustered?
The primary key is the revision ID number.
There are also indexes by namespace/title/timestamp and by timestamp alone.
-- brion vibber (brion @ pobox.com)
wikitech-l@lists.wikimedia.org