Ticket #1097 (new defect)

Opened 7 months ago

Last modified 7 months ago

ispcp-vrl-traff-correction generates high load on mysql db -> DB locked

Reported by: anonymous Assigned to:
Priority: major Milestone: ispCP ω 1.1.0
Component: Backend (Engine) Version: ispCP ω 1.0.0 - RC3
Severity: Medium Keywords: ispcp-vrl-traff-correction
Cc:

Description

Quick solution:

87 my $time = time() - (60 * 30);

88

89 my $sql = "SELECT traff_time, IFNULL( sum( t2.dtraff_mail ) , 0 ) AS dom_mail_sum, IFNULL( sum( t2.dtraff_pop ) , 0 ) AS dom_pop_sum, IFNULL( sum( t2.dtraff_web ) , 0 ) AS dom_web_sum, ifnull( (t1.bytes_mail_in + t1.bytes_mail_out), 0 ) - IFNULL( sum( t2.dtraff_mail ) , 0 ) AS diff_mail, ifnull( (t1.bytes_pop_in + t1.bytes_pop_out), 0 ) - IFNULL( sum( t2.d traff_pop ) , 0 ) AS diff_pop, ifnull( (t1.bytes_web_in + t1.bytes_web_out), 0 ) - IFNULL( sum( t2.dtraff_web ) , 0 ) AS diff_web FROM server_traffic AS t1 INNER JOIN domain_traffic AS t2 ON t2.dtraff_time = t1.traff_time WHERE t1.traff_time > $time and t2.dtraff_time > $time and t1.correction = 0 and t2.correction = 0 GROUP BY t2.dtraff_time;";

Attachments

Change History

03/14/08 15:02:32 changed by rats

  • milestone changed from Working to ispCP ω 1.0.0 - RC4.

maybe it would be better to work with mysql views!

03/14/08 15:02:59 changed by rats

  • priority changed from critical to major.
  • severity changed from Hard to Medium.

03/14/08 16:28:32 changed by rats

  • milestone changed from ispCP ω 1.0.0 - RC4 to ispCP ω 1.1.0.

patch added in r1057 -> use views on 1.1


Add/Change #1097 (ispcp-vrl-traff-correction generates high load on mysql db -> DB locked)