mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-29 06:38:52 +00:00
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:
parent
c0cd713f4c
commit
2906a24122
11 changed files with 18 additions and 0 deletions
|
@ -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'),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -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'),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -169,6 +169,7 @@
|
|||
<li>[Change] Disallow deleting the last question of the Q&A CAPTCHA.</li>
|
||||
<li>[Change] Tweak Q&A CAPTCHA garbage collection.</li>
|
||||
<li>[Change] Show a proper preview for the Q&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 "auth=http".</li>
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -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'),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
);
|
||||
|
||||
|
|
|
@ -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`;
|
||||
|
||||
|
|
|
@ -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)
|
||||
/
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
/*
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Add table
Reference in a new issue