KeyValueStorage optimize