set sql_log_bin=0;
use accounting;

ALTER TABLE cdr drop primary key, add index id_stime_idx (id, start_time);
ALTER TABLE cdr_cash_balance_data drop primary key,
    add index cdr_id_idx (cdr_id, provider_id, direction_id, cash_balance_id, cdr_start_time);
ALTER TABLE cdr_time_balance_data drop primary key,
    add index cdr_id_idx (cdr_id, provider_id, direction_id, time_balance_id, cdr_start_time);
ALTER TABLE cdr_relation_data drop primary key,
    add index cdr_id_idx (cdr_id, provider_id, direction_id, relation_id, cdr_start_time);
ALTER TABLE cdr_tag_data drop primary key,
    add index cdr_id_idx (cdr_id, provider_id, direction_id, tag_id, cdr_start_time);
