mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-29 02:59:52 +02:00
- added a UNIQUE index on the wordmatch table
- some modifications of search indexing which might improve the speed and hopefully fixes [Bug #8352] - added logging to search indexing [Bug #8384] git-svn-id: file:///svn/phpbb/trunk@7119 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -949,6 +949,7 @@ CREATE TABLE phpbb_search_wordmatch (
|
||||
title_match INTEGER DEFAULT 0 NOT NULL
|
||||
);;
|
||||
|
||||
CREATE UNIQUE INDEX phpbb_search_wordmatch_unique_match ON phpbb_search_wordmatch(word_id, post_id, title_match);;
|
||||
CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch(word_id);;
|
||||
CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch(post_id);;
|
||||
|
||||
|
@@ -1123,6 +1123,9 @@ CREATE TABLE [phpbb_search_wordmatch] (
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE UNIQUE INDEX [unique_match] ON [phpbb_search_wordmatch]([word_id], [post_id], [title_match]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [word_id] ON [phpbb_search_wordmatch]([word_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
@@ -648,6 +648,7 @@ CREATE TABLE phpbb_search_wordmatch (
|
||||
post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
word_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
title_match tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
UNIQUE unique_match (word_id, post_id, title_match),
|
||||
KEY word_id (word_id),
|
||||
KEY post_id (post_id)
|
||||
);
|
||||
|
@@ -648,6 +648,7 @@ CREATE TABLE phpbb_search_wordmatch (
|
||||
post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
word_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
title_match tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
UNIQUE unique_match (word_id, post_id, title_match),
|
||||
KEY word_id (word_id),
|
||||
KEY post_id (post_id)
|
||||
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
||||
|
@@ -1260,7 +1260,8 @@ END;
|
||||
CREATE TABLE phpbb_search_wordmatch (
|
||||
post_id number(8) DEFAULT '0' NOT NULL,
|
||||
word_id number(8) DEFAULT '0' NOT NULL,
|
||||
title_match number(1) DEFAULT '0' NOT NULL
|
||||
title_match number(1) DEFAULT '0' NOT NULL,
|
||||
CONSTRAINT u_phpbb_unique_match UNIQUE (word_id, post_id, title_match)
|
||||
)
|
||||
/
|
||||
|
||||
|
@@ -862,6 +862,7 @@ CREATE TABLE phpbb_search_wordmatch (
|
||||
title_match INT2 DEFAULT '0' NOT NULL CHECK (title_match >= 0)
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX phpbb_search_wordmatch_unique_match ON phpbb_search_wordmatch (word_id, post_id, title_match);
|
||||
CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id);
|
||||
CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id);
|
||||
|
||||
|
@@ -628,6 +628,7 @@ CREATE TABLE phpbb_search_wordmatch (
|
||||
title_match INTEGER UNSIGNED NOT NULL DEFAULT '0'
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX phpbb_search_wordmatch_unique_match ON phpbb_search_wordmatch (word_id, post_id, title_match);
|
||||
CREATE INDEX phpbb_search_wordmatch_word_id ON phpbb_search_wordmatch (word_id);
|
||||
CREATE INDEX phpbb_search_wordmatch_post_id ON phpbb_search_wordmatch (post_id);
|
||||
|
||||
|
Reference in New Issue
Block a user