trunc效率比较
trunc效率比较
select count(*) from balance_acct_item_payed where billing_cycle_id=202005 and trunc(created_date) = trunc(sysdate-70);
select count(*) from balance_acct_item_payed where billing_cycle_id=202005 and to_char(sysdate-70,'yyyymmdd')=to_char(created_date,'yyyymmdd');
select count(*) from balance_acct_item_payed where billing_cycle_id=202005 and created_date >= trunc(SYSDATE-70, 'dd') and created_date < trunc(SYSDATE-69, 'dd');