]> git.donarmstrong.com Git - debbugs.git/blobdiff - sql/debbugs_schema.sql
add coalesce bug_status_cache index to schema from installsql
[debbugs.git] / sql / debbugs_schema.sql
index c091a6e5396d971aa76d54dc0fe0038b4b1eda7f..0b5b86e143900dd1146b73c35f0e31474f0feef3 100644 (file)
@@ -443,7 +443,10 @@ CREATE TABLE bug_status_cache (
        modified TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL,
        asof TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL
 );
-CREATE UNIQUE INDEX bug_status_cache_bug_suite_arch_idx ON bug_status_cache(bug,suite,arch);
+CREATE UNIQUE INDEX bug_status_cache_bug_suite_arch_idx ON
+       bug_status_cache(bug,suite,arch);
+CREATE UNIQUE INDEX bug_status_cache_bug_col_suite_col_arch_idx ON
+       bug_status_cache(bug,COALESCE(suite,0),COALESCE(arch,0));
 CREATE INDEX bug_status_cache_idx_bug ON bug_status_cache(bug);
 CREATE INDEX bug_status_cache_idx_status ON bug_status_cache(status);
 CREATE INDEX bug_status_cache_idx_arch ON bug_status_cache(arch);