From 38b9da0488cb8ac17f46abf2f88e32635205c514 Mon Sep 17 00:00:00 2001 From: e107steved Date: Tue, 5 Oct 2010 19:39:08 +0000 Subject: [PATCH] Query speedups - thanks Mikey --- e107_admin/db_verify.php | 2 +- e107_admin/sql/core_sql.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/e107_admin/db_verify.php b/e107_admin/db_verify.php index a11e7822c..ce60ed810 100644 --- a/e107_admin/db_verify.php +++ b/e107_admin/db_verify.php @@ -91,7 +91,7 @@ function read_tables($tab) } } - if (strpos($line, "TYPE=") !== FALSE) + if ((strpos($line, "TYPE=") !== FALSE) || (strpos($line, "ENGINE=") !== FALSE)) { $current_table = ""; } diff --git a/e107_admin/sql/core_sql.php b/e107_admin/sql/core_sql.php index ee48e7fdb..531deae83 100644 --- a/e107_admin/sql/core_sql.php +++ b/e107_admin/sql/core_sql.php @@ -355,8 +355,9 @@ CREATE TABLE online ( online_location text NOT NULL, online_pagecount tinyint(3) unsigned NOT NULL default '0', online_active int(10) unsigned NOT NULL default '0', - online_agent varchar(255) NOT NULL default '' -) TYPE=MyISAM; + online_agent varchar(255) NOT NULL default '', + KEY online_ip (online_ip) +) TYPE=InnoDB; # -------------------------------------------------------- #