sar*_*lwp 7 sql oracle performance datestamp
我有98w行数据.当我想用pub_time对数据进行排序时,我发现了一件有趣的事情.
这是SQL:
select *
from t_p_blog_article_info t
order by t.pub_time desc
Run Code Online (Sandbox Code Playgroud)
它花了19s.
select *
from t_p_blog_article_info t
where t.pub_time > to_date( '1900-01-01 01:00:00', 'yyyy-mm-dd hh24:mi:ss ')
order by t.pub_time desc
Run Code Online (Sandbox Code Playgroud)
它的成本为0.2秒.
我想知道,为什么?
| 归档时间: |
|
| 查看次数: |
772 次 |
| 最近记录: |