[Rt-commit] rt branch 5.0/change-indexes-on-links-table created. rt-5.0.4-18-gc178d3d14c

BPS Git Server git at git.bestpractical.com
Mon May 22 20:33:40 UTC 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/change-indexes-on-links-table has been created
        at  c178d3d14ccd7cf0f47cf795e73fb7c999ae0e02 (commit)

- Log -----------------------------------------------------------------
commit c178d3d14ccd7cf0f47cf795e73fb7c999ae0e02
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Mon May 22 23:29:07 2023 +0300

    Add inndexes (Local{Base, Target}, Type) instead of Links4
    
    Indexes starting from Local* columns are more selective.
    
    There were no index starting from LocalTarget. Now if you know
    local target ID then search would be very fast.
    
    Index starting from Type or having only Type column doesn't seems
    to be very selective and required.

diff --git a/etc/RT_SiteConfig.pm b/etc/RT_SiteConfig.pm
index 6aaff51fc5..778b55ddd1 100644
--- a/etc/RT_SiteConfig.pm
+++ b/etc/RT_SiteConfig.pm
@@ -32,4 +32,6 @@ Set( $rtname, 'example.com');
 # of the correct syntax to use when activating them:
 #     Plugin( "RT::Extension::HelpDesk" );
 
+Set( $DevelMode, 1 );
+
 1;
diff --git a/etc/schema.Oracle b/etc/schema.Oracle
index f0f783f80d..c40897ecb5 100644
--- a/etc/schema.Oracle
+++ b/etc/schema.Oracle
@@ -59,7 +59,8 @@ CREATE TABLE Links (
 CREATE UNIQUE INDEX Links1 ON Links (Base, Target, Type);
 CREATE INDEX Links2 ON Links (Base, Type);
 CREATE INDEX Links3 ON Links (Target, Type);
-CREATE INDEX Links4 ON Links(Type,LocalBase);
+CREATE INDEX Links5 ON Links (LocalBase, Type);
+CREATE INDEX Links6 ON Links (LocalTarget, Type);
 
 
 CREATE SEQUENCE PRINCIPALS_seq;
diff --git a/etc/schema.Pg b/etc/schema.Pg
index 9ab84bba1c..ea5863e3c8 100644
--- a/etc/schema.Pg
+++ b/etc/schema.Pg
@@ -92,7 +92,8 @@ CREATE TABLE Links (
 
 );
 CREATE UNIQUE INDEX Links1 ON Links (Base, Target, Type) ;
-CREATE INDEX Links4 ON Links(Type,LocalBase);
+CREATE INDEX Links5 ON Links (LocalBase, Type);
+CREATE INDEX Links6 ON Links (LocalTarget, Type);
 
 
 
diff --git a/etc/schema.SQLite b/etc/schema.SQLite
index cdafced4f8..42fb40397c 100644
--- a/etc/schema.SQLite
+++ b/etc/schema.SQLite
@@ -60,7 +60,8 @@ CREATE TABLE Links (
   
 ) ;
 CREATE UNIQUE INDEX Links1 ON Links (Base, Target, Type) ;
-CREATE INDEX Links4 ON Links(Type,LocalBase);
+CREATE INDEX Links5 ON Links(LocalBase, Type);
+CREATE INDEX Links6 ON Links(LocalTarget, Type);
 
 --- }}}
 
diff --git a/etc/schema.mysql b/etc/schema.mysql
index 5a359e5e9d..efdb95fe4d 100644
--- a/etc/schema.mysql
+++ b/etc/schema.mysql
@@ -58,7 +58,8 @@ CREATE TABLE Links (
 
 CREATE INDEX Links2 ON Links (Base,  Type) ;
 CREATE INDEX Links3 ON Links (Target,  Type) ;
-CREATE INDEX Links4 ON Links (Type,LocalBase);
+CREATE INDEX Links5 ON Links (LocalBase, Type);
+CREATE INDEX Links6 ON Links (LocalTarget, Type);
 
 
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list