Removed dropping and recreating cc_schedule table index before inserting into this table.

We thought it would be a significant performance booster but it isn't
This commit is contained in:
denise 2013-05-28 16:19:17 -04:00
parent 8f418fb34c
commit 9545d8aacb
3 changed files with 0 additions and 18 deletions

View File

@ -527,10 +527,6 @@ class Application_Model_Scheduler
$linked = false;
$dropIndex_sql = "DROP INDEX cc_schedule_instance_id_idx";
Application_Common_Database::prepareAndExecute(
$dropIndex_sql, array(), Application_Common_Database::EXECUTE);
foreach ($scheduleItems as $schedule) {
$id = intval($schedule["id"]);
@ -817,11 +813,6 @@ class Application_Model_Scheduler
}//for each instance
}//for each schedule location
$createIndex_sql = "CREATE INDEX cc_schedule_instance_id_idx ".
"ON cc_schedule USING btree(instance_id)";
Application_Common_Database::prepareAndExecute(
$createIndex_sql, array(), Application_Common_Database::EXECUTE);
$endProfile = microtime(true);
Logging::debug("finished adding scheduled items.");
Logging::debug(floatval($endProfile) - floatval($startProfile));

View File

@ -177,10 +177,6 @@ class Application_Service_SchedulerService
$timeFilled = Application_Common_Database::prepareAndExecute(
$timeFilled_sql, array(), Application_Common_Database::COLUMN);
$dropIndex_sql = "DROP INDEX cc_schedule_instance_id_idx";
Application_Common_Database::prepareAndExecute(
$dropIndex_sql, array(), Application_Common_Database::EXECUTE);
//need to find out which linked instances are empty
$values = array();
foreach ($instanceIds as $id) {
@ -240,11 +236,6 @@ class Application_Service_SchedulerService
Application_Common_Database::prepareAndExecute(
$insert_sql, array(), Application_Common_Database::EXECUTE);
$createIndex_sql = "CREATE INDEX cc_schedule_instance_id_idx ".
"ON cc_schedule USING btree(instance_id)";
Application_Common_Database::prepareAndExecute(
$createIndex_sql, array(), Application_Common_Database::EXECUTE);
//update time_filled in cc_show_instances
$now = gmdate("Y-m-d H:i:s");
$update_sql = "UPDATE cc_show_instances SET ".

Binary file not shown.

Before

Width:  |  Height:  |  Size: 801 B

After

Width:  |  Height:  |  Size: 481 B