diff options
author | David M <davidmj@users.sourceforge.net> | 2007-05-05 04:53:43 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2007-05-05 04:53:43 +0000 |
commit | dfe674ffa12a77468ef2663d75d67768ee219039 (patch) | |
tree | 1b70dd9b08eaa2798eb3a3dbd3085fc699c40e66 /phpBB/install/schemas | |
parent | 65fe2e0e367e0bd9acf3f3db377874ad57731e8c (diff) | |
download | forums-dfe674ffa12a77468ef2663d75d67768ee219039.tar forums-dfe674ffa12a77468ef2663d75d67768ee219039.tar.gz forums-dfe674ffa12a77468ef2663d75d67768ee219039.tar.bz2 forums-dfe674ffa12a77468ef2663d75d67768ee219039.tar.xz forums-dfe674ffa12a77468ef2663d75d67768ee219039.zip |
- changed the way we do forum accounting in phpBB, far less intensive and much faster. sync() recalculates the number of topics and posts using just the topics table instead of having to join topics and posts together. However, even this can be avoided if we know what operation is happening and an auto sync is not in action. Since MCP operations are "known", we can provide very fast MCP operations.
- changed the way we decide if a DB gets multi value support. Old method uses switch/case, new method assumes a DB can't unless the DB says it can via a property
I hope nothing is broken :P
git-svn-id: file:///svn/phpbb/trunk@7466 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/schemas')
-rw-r--r-- | phpBB/install/schemas/firebird_schema.sql | 1 | ||||
-rw-r--r-- | phpBB/install/schemas/mssql_schema.sql | 3 | ||||
-rw-r--r-- | phpBB/install/schemas/mysql_40_schema.sql | 1 | ||||
-rw-r--r-- | phpBB/install/schemas/mysql_41_schema.sql | 1 | ||||
-rw-r--r-- | phpBB/install/schemas/oracle_schema.sql | 2 | ||||
-rw-r--r-- | phpBB/install/schemas/postgres_schema.sql | 1 | ||||
-rw-r--r-- | phpBB/install/schemas/sqlite_schema.sql | 1 |
7 files changed, 10 insertions, 0 deletions
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index 626874474b..50a59d9c98 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -1234,6 +1234,7 @@ CREATE INDEX phpbb_topics_forum_id ON phpbb_topics(forum_id);; CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics(forum_id, topic_type);; CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics(topic_last_post_time);; CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics(topic_approved);; +CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics(forum_id, topic_approved, topic_last_post_id);; CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics(forum_id, topic_last_post_time, topic_moved_id);; CREATE GENERATOR phpbb_topics_gen;; diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 89db3d2824..7caea395ec 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -1455,6 +1455,9 @@ GO CREATE INDEX [topic_approved] ON [phpbb_topics]([topic_approved]) ON [PRIMARY] GO +CREATE INDEX [forum_appr_last] ON [phpbb_topics]([forum_id], [topic_approved], [topic_last_post_id]) ON [PRIMARY] +GO + CREATE INDEX [fid_time_moved] ON [phpbb_topics]([forum_id], [topic_last_post_time], [topic_moved_id]) ON [PRIMARY] GO diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index 17afe935ae..a5d850ca68 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -835,6 +835,7 @@ CREATE TABLE phpbb_topics ( KEY forum_id_type (forum_id, topic_type), KEY last_post_time (topic_last_post_time), KEY topic_approved (topic_approved), + KEY forum_appr_last (forum_id, topic_approved, topic_last_post_id), KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id) ); diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index f2366835ca..6308ed0c15 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -835,6 +835,7 @@ CREATE TABLE phpbb_topics ( KEY forum_id_type (forum_id, topic_type), KEY last_post_time (topic_last_post_time), KEY topic_approved (topic_approved), + KEY forum_appr_last (forum_id, topic_approved, topic_last_post_id), KEY fid_time_moved (forum_id, topic_last_post_time, topic_moved_id) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index f185e79ff9..8ad99ea189 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -1633,6 +1633,8 @@ CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time) / CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved) / +CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id) +/ CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id) / diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 946526eba8..fe20316705 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -1090,6 +1090,7 @@ CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id); CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type); CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time); CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved); +CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id); CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id); /* diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 0b7b4e8961..fcd6a50679 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -807,6 +807,7 @@ CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id); CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type); CREATE INDEX phpbb_topics_last_post_time ON phpbb_topics (topic_last_post_time); CREATE INDEX phpbb_topics_topic_approved ON phpbb_topics (topic_approved); +CREATE INDEX phpbb_topics_forum_appr_last ON phpbb_topics (forum_id, topic_approved, topic_last_post_id); CREATE INDEX phpbb_topics_fid_time_moved ON phpbb_topics (forum_id, topic_last_post_time, topic_moved_id); # Table: 'phpbb_topics_track' |