jenkins-bot has submitted this change and it was merged.

Change subject: Add index on notification_event
......................................................................


Add index on notification_event

So we can easily query the notification rows that belong to
a given event row. This is needed for the removeOrphanedEvents
maintenance script to run efficiently.

Change-Id: I99fc31a62b37259d7000577583c8e8a599e400f9
---
M Hooks.php
A db_patches/patch-add-notification_event-index.sql
M echo.sql
3 files changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Hooks.php b/Hooks.php
index e75f3f9..5f90a31 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -165,6 +165,7 @@
                $updater->addExtensionField( 'echo_event', 'event_page_id', 
"$dir/db_patches/patch-add-echo_event-event_page_id.sql" );
                $updater->addExtensionIndex( 'echo_event', 'echo_event_type', 
"$dir/db_patches/patch-alter-event_type-index.sql" );
                $updater->addExtensionIndex( 'echo_notification', 
'echo_user_timestamp', "$dir/db_patches/patch-alter-user_timestamp-index.sql" );
+               $updater->addExtensionIndex( 'echo_notification', 
'echo_notification_event', 
"$dir/db_patches/patch-add-notification_event-index.sql" );
                $updater->addPostDatabaseUpdateMaintenance( 
'RemoveOrphanedEvents' );
        }
 
diff --git a/db_patches/patch-add-notification_event-index.sql 
b/db_patches/patch-add-notification_event-index.sql
new file mode 100644
index 0000000..1243b80
--- /dev/null
+++ b/db_patches/patch-add-notification_event-index.sql
@@ -0,0 +1 @@
+CREATE INDEX /*i*/echo_notification_event ON /*_*/echo_notification 
(notification_event);
diff --git a/echo.sql b/echo.sql
index 910203a..392e1d0 100644
--- a/echo.sql
+++ b/echo.sql
@@ -30,6 +30,7 @@
 CREATE INDEX /*i*/echo_notification_user_base_timestamp ON 
/*_*/echo_notification (notification_user, notification_bundle_base, 
notification_timestamp, notification_event);
 CREATE INDEX /*i*/echo_notification_user_hash_timestamp ON 
/*_*/echo_notification (notification_user, notification_bundle_hash, 
notification_timestamp);
 CREATE INDEX /*i*/echo_notification_user_hash_base_timestamp ON 
/*_*/echo_notification (notification_user, notification_bundle_display_hash, 
notification_bundle_base, notification_timestamp);
+CREATE INDEX /*i*/echo_notification_event ON /*_*/echo_notification 
(notification_event);
 
 CREATE TABLE /*_*/echo_email_batch (
        eeb_id int unsigned not null primary key auto_increment,

-- 
To view, visit https://gerrit.wikimedia.org/r/294111
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I99fc31a62b37259d7000577583c8e8a599e400f9
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Springle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to