Bug #56545 - Speed up topic move operation by adding an index for topic_id on the topics track table.

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10462 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Andreas Fischer 2010-01-28 23:15:25 +00:00
parent c0cd713f4c
commit 2906a24122
11 changed files with 18 additions and 0 deletions

View file

@ -1746,6 +1746,7 @@ function get_schema_struct()
),
'PRIMARY_KEY' => array('user_id', 'topic_id'),
'KEYS' => array(
'topic_id' => array('INDEX', 'topic_id'),
'forum_id' => array('INDEX', 'forum_id'),
),
);

View file

@ -1236,6 +1236,7 @@ function get_schema_struct()
),
'PRIMARY_KEY' => array('user_id', 'topic_id'),
'KEYS' => array(
'topic_id' => array('INDEX', 'topic_id'),
'forum_id' => array('INDEX', 'forum_id'),
),
);

View file

@ -169,6 +169,7 @@
<li>[Change] Disallow deleting the last question of the Q&amp;A CAPTCHA.</li>
<li>[Change] Tweak Q&amp;A CAPTCHA garbage collection.</li>
<li>[Change] Show a proper preview for the Q&amp;A CAPTCHA. (Bug #56365)</li>
<li>[Change] Speed up topic move operation by adding an index for topic_id on the topics track table. (Bug #56545)</li>
<li>[Feature] Ability to use HTTP authentication in ATOM feeds by passing the GET parameter &quot;auth=http&quot;.</li>
</ul>

View file

@ -900,6 +900,11 @@ function database_update_info()
'drop_keys' => array(
LOG_TABLE => array('log_time'),
),
'add_index' => array(
TOPICS_TRACK_TABLE => array(
'topic_id' => array('topic_id'),
),
),
),
);
}

View file

@ -1262,6 +1262,7 @@ CREATE TABLE phpbb_topics_track (
ALTER TABLE phpbb_topics_track ADD PRIMARY KEY (user_id, topic_id);;
CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track(topic_id);;
CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track(forum_id);;
# Table: 'phpbb_topics_posted'

View file

@ -1506,6 +1506,9 @@ ALTER TABLE [phpbb_topics_track] WITH NOCHECK ADD
) ON [PRIMARY]
GO
CREATE INDEX [topic_id] ON [phpbb_topics_track]([topic_id]) ON [PRIMARY]
GO
CREATE INDEX [forum_id] ON [phpbb_topics_track]([forum_id]) ON [PRIMARY]
GO

View file

@ -861,6 +861,7 @@ CREATE TABLE phpbb_topics_track (
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (user_id, topic_id),
KEY topic_id (topic_id),
KEY forum_id (forum_id)
);

View file

@ -861,6 +861,7 @@ CREATE TABLE phpbb_topics_track (
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (user_id, topic_id),
KEY topic_id (topic_id),
KEY forum_id (forum_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;

View file

@ -1665,6 +1665,8 @@ CREATE TABLE phpbb_topics_track (
)
/
CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id)
/
CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id)
/

View file

@ -1116,6 +1116,7 @@ CREATE TABLE phpbb_topics_track (
PRIMARY KEY (user_id, topic_id)
);
CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id);
CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id);
/*

View file

@ -833,6 +833,7 @@ CREATE TABLE phpbb_topics_track (
PRIMARY KEY (user_id, topic_id)
);
CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id);
CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id);
# Table: 'phpbb_topics_posted'