fix optimize for tcb db