r93998 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93997‎ | r93998 | r93999 >
Date:20:54, 5 August 2011
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
Add index to help with SQL queries used for author stats
Modified paths:
  • /trunk/extensions/CodeReview/CodeReview.php (modified) (history)
  • /trunk/extensions/CodeReview/archives/code_revs_status_author-index.sql (added) (history)
  • /trunk/extensions/CodeReview/codereview.sql (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/CodeReview.php
@@ -285,6 +285,9 @@
286286
287287 $updater->addExtensionUpdate( array( 'addIndex', 'code_paths', 'repo_path',
288288 "$base/archives/codereview-repopath.sql", true ) );
 289+
 290+ $updater->addExtensionUpdate( array( 'addIndex', 'code_revs', 'cr_repo_status_author',
 291+ "$base/archives/code_revs_status_author-index.sql", true ) );
289292 break;
290293 case 'sqlite':
291294 $updater->addExtensionUpdate( array( 'addTable', 'code_rev', "$base/codereview.sql", true ) );
Index: trunk/extensions/CodeReview/codereview.sql
@@ -71,6 +71,7 @@
7272
7373 CREATE INDEX /*i*/cr_repo_id ON /*_*/code_rev (cr_repo_id, cr_timestamp);
7474 CREATE INDEX /*i*/cr_repo_author ON /*_*/code_rev (cr_repo_id, cr_author, cr_timestamp);
 75+CREATE INDEX /*i*/cr_repo_status_author ON /*_*/code_rev (cr_repo_id, cr_status, cr_author);
7576
7677 --
7778 -- Allow us to match up repository usernames
Index: trunk/extensions/CodeReview/archives/code_revs_status_author-index.sql
@@ -0,0 +1 @@
 2+CREATE INDEX /*i*/cr_repo_status_author ON /*_*/code_rev (cr_repo_id, cr_status, cr_author);
\ No newline at end of file
Property changes on: trunk/extensions/CodeReview/archives/code_revs_status_author-index.sql
___________________________________________________________________
Added: svn:eol-style
13 + native

Follow-up revisions

RevisionCommit summaryAuthorDate
r94183Fix code_revs to code_revreedy18:56, 10 August 2011

Comments

#Comment by RobLa-WMF (talk | contribs)   18:49, 10 August 2011

Fixme: table name mismatch ("code_revs" vs. "code_rev")

Status & tagging log