Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagesql
mysql> select min(id) into @ID from performance_sample where sample_time like @day;
mysql> delete from performance_aggregate where sample_id < @ID; 
mysql> delete from performance_cpu where sample_id < @ID;
mysql> delete from performance_disk where sample_id < @ID;
mysql> delete from performance_disk_total where sample_id < @ID;
mysql> delete from performance_esx3_workload where sample_id < @ID;
mysql> delete from performance_fscap where sample_id < @ID;
mysql> delete from performance_lpar_workload where sample_id < @ID;
mysql> delete from performance_network where sample_id < @ID;
mysql> delete from performance_nrm where sample_id < @ID;
mysql> delete from performance_psinfo where sample_id < @ID;
mysql> delete from performance_vxvol where sample_id < @ID;
mysql> delete from performance_who where sample_id < @ID;
mysql> delete from performance_sample where sample_time < @day;
mysql> select min(sample_id) into @ID from vmware_perf_sample where sample_time like @day;
mysql> delete from vmware_perf_aggregate where sample_id < @ID;
mysql> delete from vmware_perf_cluster where sample_id < @ID;
mysql> delete from vmware_perf_datastore_usage where sample_id < @ID;
mysql> delete from vmware_perf_datastore_vm_usage where sample_id < @ID;
mysql> delete from vmware_perf_disk_rate where sample_id < @ID;
mysql> delete from vmware_perf_entitlement where sample_id < @ID;
mysql> delete from vmware_perf_host_cpu where sample_id < @ID;
mysql> delete from vmware_perf_host_disk_io where sample_id < @ID;
mysql> delete from vmware_perf_host_disk_io_adv where sample_id < @ID;
mysql> delete from vmware_perf_host_network where sample_id < @ID;
mysql> delete from vmware_perf_host_power_state where sample_id < @ID;
mysql> delete from vmware_perf_mem where sample_id < @ID;
mysql> delete from vmware_perf_mem_advanced where sample_id < @ID;
mysql> delete from vmware_perf_network_rate where sample_id < @ID;
mysql> delete from vmware_perf_vm_cpu where sample_id < @ID;
mysql> delete from vmware_perf_vm_disk_io where sample_id < @ID;
mysql> delete from vmware_perf_vm_network where sample_id < @ID;
mysql> delete from vmware_perf_vm_power_state where sample_id < @ID;
mysql> delete from vmware_perf_vm_storage_usage where sample_id < @ID;
mysql> delete from vmware_perf_vm_vcpu where sample_id < @ID;
mysql> delete from vmware_perf_watts where sample_id < @ID;
mysql> delete from vmware_perf_sample where sample_time < @day;
mysql> select min(id) into @ID from net_device_perf_sample where sample_time like @day;
mysql> delete from net_device_perf_ping where sampletime < @day;
mysql> delete from net_device_perf_port where sampletime < @day;
mysql> delete from net_device_perf_sample where sampletime < @day;
mysql> delete from erdc_decimal_data where sampletime < @day;
mysql> delete from erdc_int_data where sampletime < @day;
mysql> delete from erdc_string_data where sampletime < @day;
mysql> delete from ranged_object_value where sample_time < @day;
mysql> truncate archive_delenda;

...