changes to database optimizers and cleaner scripts for new vicidial_campaign_server_stats table
git-svn-id: svn://192.168.202.10@321 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -180,6 +180,17 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
$stmtA = "optimize table vicidial_campaign_server_stats;";
|
||||
if($DB){print STDERR "\n|$stmtA|\n";}
|
||||
if (!$T) {
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
$stmtA = "optimize table vicidial_dnc;";
|
||||
if($DB){print STDERR "\n|$stmtA|\n";}
|
||||
if (!$T) {
|
||||
|
||||
@@ -147,8 +147,6 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
|
||||
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
|
||||
if (!$Q) {print " - optimize vicidial_manager \n";}
|
||||
|
||||
|
||||
@@ -162,8 +160,6 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
|
||||
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
|
||||
if (!$Q) {print " - optimize vicidial_live_agents \n";}
|
||||
|
||||
|
||||
@@ -178,8 +174,6 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
|
||||
$rec_countY++;
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
|
||||
if (!$Q) {print " - optimize vicidial_auto_calls \n";}
|
||||
|
||||
|
||||
@@ -193,8 +187,6 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
|
||||
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
|
||||
if (!$Q) {print " - optimize vicidial_hopper \n";}
|
||||
|
||||
|
||||
|
||||
@@ -100,6 +100,11 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
|
||||
$affected_rows = $dbhA->do($stmtA); # or die "Couldn't execute query: |$stmtA|\n";
|
||||
print " - vicidial__users delete\n";
|
||||
|
||||
$stmtA = "DELETE from vicidial_campaign_server_stats where server_ip='$server_ip';";
|
||||
if($DB){print STDERR "\n|$stmtA|\n";}
|
||||
$affected_rows = $dbhA->do($stmtA); # or die "Couldn't execute query: |$stmtA|\n";
|
||||
print " - vicidial_campaign_server_stats delete\n";
|
||||
|
||||
$dbhA->disconnect();
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user