mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Fix bug #44665 - Add index on log_time to the log table to prevent slowdown on boards with many log entries.
Authorised by: acydburn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9564 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
27d4c7229d
commit
9f21f1ab5e
11 changed files with 21 additions and 2 deletions
|
@ -1195,6 +1195,7 @@ function get_schema_struct()
|
|||
'PRIMARY_KEY' => 'log_id',
|
||||
'KEYS' => array(
|
||||
'log_type' => array('INDEX', 'log_type'),
|
||||
'log_time' => array('INDEX', 'log_time'),
|
||||
'forum_id' => array('INDEX', 'forum_id'),
|
||||
'topic_id' => array('INDEX', 'topic_id'),
|
||||
'reportee_id' => array('INDEX', 'reportee_id'),
|
||||
|
|
|
@ -667,6 +667,7 @@ function get_schema_struct()
|
|||
'PRIMARY_KEY' => 'log_id',
|
||||
'KEYS' => array(
|
||||
'log_type' => array('INDEX', 'log_type'),
|
||||
'log_time' => array('INDEX', 'log_time'),
|
||||
'forum_id' => array('INDEX', 'forum_id'),
|
||||
'topic_id' => array('INDEX', 'topic_id'),
|
||||
'reportee_id' => array('INDEX', 'reportee_id'),
|
||||
|
|
|
@ -96,6 +96,7 @@
|
|||
<li>[Fix] Various XHTML mistakes in prosilver and subsilver2. (Bugs #38555, #45505 - Patch by Raimon, #45785, #45865)</li>
|
||||
<li>[Fix] Move post bump information markup to the template. (Bug #34295 - Patch by bantu)</li>
|
||||
<li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li>
|
||||
<li>[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</li>
|
||||
<li>[Feature] Backported 3.2 captcha plugins.</li>
|
||||
<li>[Feature] Introduced new ACM plugins:
|
||||
<ul>
|
||||
|
|
|
@ -678,8 +678,14 @@ function database_update_info()
|
|||
// No changes from 3.0.5-RC1 to 3.0.5
|
||||
'3.0.5-RC1' => array(),
|
||||
|
||||
// No changes from 3.0.5
|
||||
'3.0.5' => array(),
|
||||
// Changes from 3.0.5
|
||||
'3.0.5' => array(
|
||||
'add_index' => array(
|
||||
LOG_TABLE => array(
|
||||
'log_time' => array('log_time'),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -526,6 +526,7 @@ CREATE TABLE phpbb_log (
|
|||
ALTER TABLE phpbb_log ADD PRIMARY KEY (log_id);;
|
||||
|
||||
CREATE INDEX phpbb_log_log_type ON phpbb_log(log_type);;
|
||||
CREATE INDEX phpbb_log_log_time ON phpbb_log(log_time);;
|
||||
CREATE INDEX phpbb_log_forum_id ON phpbb_log(forum_id);;
|
||||
CREATE INDEX phpbb_log_topic_id ON phpbb_log(topic_id);;
|
||||
CREATE INDEX phpbb_log_reportee_id ON phpbb_log(reportee_id);;
|
||||
|
|
|
@ -636,6 +636,9 @@ GO
|
|||
CREATE INDEX [log_type] ON [phpbb_log]([log_type]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [log_time] ON [phpbb_log]([log_time]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [forum_id] ON [phpbb_log]([forum_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
|
|
@ -359,6 +359,7 @@ CREATE TABLE phpbb_log (
|
|||
log_data mediumblob NOT NULL,
|
||||
PRIMARY KEY (log_id),
|
||||
KEY log_type (log_type),
|
||||
KEY log_time (log_time),
|
||||
KEY forum_id (forum_id),
|
||||
KEY topic_id (topic_id),
|
||||
KEY reportee_id (reportee_id),
|
||||
|
|
|
@ -359,6 +359,7 @@ CREATE TABLE phpbb_log (
|
|||
log_data mediumtext NOT NULL,
|
||||
PRIMARY KEY (log_id),
|
||||
KEY log_type (log_type),
|
||||
KEY log_time (log_time),
|
||||
KEY forum_id (forum_id),
|
||||
KEY topic_id (topic_id),
|
||||
KEY reportee_id (reportee_id),
|
||||
|
|
|
@ -712,6 +712,8 @@ CREATE TABLE phpbb_log (
|
|||
|
||||
CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type)
|
||||
/
|
||||
CREATE INDEX phpbb_log_log_time ON phpbb_log (log_time)
|
||||
/
|
||||
CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id)
|
||||
/
|
||||
CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id)
|
||||
|
|
|
@ -516,6 +516,7 @@ CREATE TABLE phpbb_log (
|
|||
);
|
||||
|
||||
CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type);
|
||||
CREATE INDEX phpbb_log_log_time ON phpbb_log (log_time);
|
||||
CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id);
|
||||
CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id);
|
||||
CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id);
|
||||
|
|
|
@ -349,6 +349,7 @@ CREATE TABLE phpbb_log (
|
|||
);
|
||||
|
||||
CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type);
|
||||
CREATE INDEX phpbb_log_log_time ON phpbb_log (log_time);
|
||||
CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id);
|
||||
CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id);
|
||||
CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id);
|
||||
|
|
Loading…
Add table
Reference in a new issue