From fa1f6d7454edcb8e30b9b0bdb14f1ec040546715 Mon Sep 17 00:00:00 2001
From: marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>
Date: Mon, 6 Oct 2008 16:25:28 +0000
Subject: Closes #402 and #407 : Right! Finally nailed this fscking issue to
 the wall (hopefully).

Modified system log to hold extra information about the class being stored, this lets us pull only the required rows from the event log.

This drastically simplifies and speeds up the query.

Requires: Database upgrade.
Outstanding issues: Query is using filesort despite using correct index. Still much faster than the last method!

git-svn-id: https://code.elgg.org/elgg/trunk@2194 36083f99-b078-4883-b0ff-0f9b5a30f544
---
 engine/schema/mysql.sql | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'engine/schema/mysql.sql')

diff --git a/engine/schema/mysql.sql b/engine/schema/mysql.sql
index bdc711d68..a0c2f0dfd 100644
--- a/engine/schema/mysql.sql
+++ b/engine/schema/mysql.sql
@@ -295,6 +295,8 @@ CREATE TABLE `prefix_system_log` (
 	PRIMARY KEY  (`id`),
 	KEY `object_id` (`object_id`),
 	KEY `object_class` (`object_class`),
+	KEY `object_type` (`object_type`),
+	KEY `object_subtype` (`object_subtype`),
 	KEY `event` (`event`),
 	KEY `performed_by_guid` (`performed_by_guid`),
 	KEY `time_created` (`time_created`)
-- 
cgit v1.2.3

