From 75cddfd8bfe3d472831271908b86126737d58d76 Mon Sep 17 00:00:00 2001 From: Domas Mituzas Date: Sun, 26 Mar 2006 10:24:12 +0000 Subject: [PATCH] a) force to read page first (as order by page_id is done) - probably it would be better to scan revision and order by rev_page, but that would require review of all possible uses of dump and special cases (as sometimes starting on page is more efficient) b) use PRIMARY index for revision, as we read full row anyway (in InnoDB row data is clustered together with PK) --- includes/Export.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/Export.php b/includes/Export.php index 1e2ad7f7a5..edea8aeae7 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -188,19 +188,21 @@ class WikiExporter { if( $cond == '' ) { // Optimization hack for full-database dump $pageindex = 'FORCE INDEX (PRIMARY)'; - $revindex = 'FORCE INDEX(page_timestamp)'; + $revindex = 'FORCE INDEX (PRIMARY)'; + $straight = ' /*! STRAIGHT_JOIN */ '; } else { $pageindex = ''; $revindex = ''; + $straight = ''; } if( $this->text == MW_EXPORT_STUB ) { - $sql = "SELECT * FROM + $sql = "SELECT $straight * FROM $page $pageindex, $revision $revindex WHERE $where $join ORDER BY page_id"; } else { - $sql = "SELECT * FROM + $sql = "SELECT $straight * FROM $page $pageindex, $revision $revindex, $text -- 2.20.1