[ZBX-6598] Very big and slow query in escalator process Created: 2013 May 13 Updated: 2017 May 30 Resolved: 2013 May 22 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 2.0.7rc1, 2.1.0 |
Fix Version/s: | 2.0.7rc1, 2.1.0 |
Type: | Incident report | Priority: | Major |
Reporter: | Alexey Pustovalov | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | escalator, oracle, performance | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Oracle |
Issue Links: |
|
Description |
In process_escalation function we remove unused (old) escaltions in a one query, in a one transaction. We should separate one query to a few queries (maybe transaction as well). For example query can be about 600KB. It is very very big query. |
Comments |
Comment by Alexey Pustovalov [ 2013 May 13 ] |
Code part where the query is performed: /* delete completed escalations */ if (0 != escalationids.values_num) { sql_offset = 0; zbx_snprintf_alloc(&sql, &sql_alloc, &sql_offset, "delete from escalations where"); DBadd_condition_alloc(&sql, &sql_alloc, &sql_offset, "escalationid", escalationids.values, escalationids.values_num); DBbegin(); DBexecute("%s", sql); DBcommit(); } |
Comment by Aleksej Ivanov (Inactive) [ 2013 May 22 ] |
Available in development branch svn://svn.zabbix.com/branches/dev/ZBX-6598 |
Comment by dimir [ 2013 May 31 ] |
Successfully tested. Small change in r36013. |
Comment by Alexander Vladishev [ 2013 May 31 ] |
Fixed in versions pre-2.0.7 r36023 and pre-2.1.0 (trunk) r36024. |