From 9545d8aacbe4bcae25d984ea0203d0a6b6f9dff4 Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 28 May 2013 16:19:17 -0400 Subject: [PATCH] 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 --- airtime_mvc/application/models/Scheduler.php | 9 --------- .../application/services/SchedulerService.php | 9 --------- airtime_mvc/public/css/images/is_playlist.png | Bin 801 -> 481 bytes 3 files changed, 18 deletions(-) diff --git a/airtime_mvc/application/models/Scheduler.php b/airtime_mvc/application/models/Scheduler.php index 4dc900cf8..e3869c662 100644 --- a/airtime_mvc/application/models/Scheduler.php +++ b/airtime_mvc/application/models/Scheduler.php @@ -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)); diff --git a/airtime_mvc/application/services/SchedulerService.php b/airtime_mvc/application/services/SchedulerService.php index 3ae0acae5..4d9116c34 100644 --- a/airtime_mvc/application/services/SchedulerService.php +++ b/airtime_mvc/application/services/SchedulerService.php @@ -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 ". diff --git a/airtime_mvc/public/css/images/is_playlist.png b/airtime_mvc/public/css/images/is_playlist.png index e5aec2e2fd752a23d2b7b7fdefadc1f50fe16e82..88cdd37a6d8e58e89969bd8f4cffd7fc1b2477c2 100644 GIT binary patch delta 455 zcmV;&0XY7l2H^vcB!3xnMObuGZ)S9NVRB^vL1b@YWgtmyVP|DhWnpA_ami&o0004l zNklpQiVHvr+1c3{*g4o4UVM1KAj~Dr@bl+ShQo&sGl+?aF)%z~(1dE11mbf* z?8Suaf4STAG1Zk{P7z095k{Aa(}gw@k<$ z`}_AV!72 zF7uwgzZU=!R20>IbpQ2L4IuM7vSKE5-N3~1ABcZ5|3GK^&=$NtmWM-N4i_8mjsn+7 xPUxDkx&S@3t*yyt)u_|002ovPDHLkV1l=U(JTM} delta 778 zcmV+l1NHpj1EB_xB!2;OQb$4nuFf3k00006VoOIv0RI600RN!9r;`8x010qNS#tmY z3ljhU3ljkVnw%H_000McNliru-31X2J0MSU_#prQ0-;GnK~y-)g_2KbTvZgtf9JmY z-kZ+Ln@l6^SX*uDM(d)2ASh^yE>kGgjks_rx_05lfu>~RN`Jw&ZUp~y)s1cy3Zk^M z6e89Z8`@G6OvN_IOlFeF`#101<7$S)AbxP+aKC#$&i9=ov$M0UqA1AooT{qW3RT7P zJZiO?1VNx8veIt1-PSi&M9wsuO?=-+M79Zt2&zg^6keL9g{po8^tK5A?}cGVyO!~gh#>NJ#tE&JzK94NmoTI9$@fig;vf!NKzhD8%vZUMXvcA5Ks*ZCo#!!~! zj_JHQvnxO}9D2jViU`ISf*>FaL!5JX#={s7MM;uPM1KV59J_Vj5WtAOsmQcn`FHIo ztSE|z;}}&X3_>ccFc|GyD{I{~>boNT%$LIF+ZoHwSZ+M&4{COi10~dj_0=KP*Bx#zGqzP`Qc%jhm^;lS*w>Sx0r4pKm z`TkE-njJ7=zDMNC%QMN<(H{JgWf>x{*6$(@;Bfr~b3gvAw$Suwk*qQb8~YH1_PG)p#U-njk;pjt%220n;=00000NkvXX It^-0~g6IKu00000