今天看数据库的时候遇到这样一个SQL语句: select substr(a.djxh,) as id, (a.nd || a.yf) DECL_YM, a.zspm_dm as LEVY_ITEM_ID, b.zsxmmc as LEVY_ITEM_NAME, --||'--'||d.zspmmc as DECL_STATUS, a.nsqx_dm as TAX_TERM_CODE, c.nsqxmc as TAX_TERM_NAME, to_char(a.sbqx, 'yyyyMMdd') a…
oracle之sql语句优化 sql语句的优化 1.在where子句中使用 is null 或 is not null 时,oracle优化器就不能使用索引了. 2.对于有连接的列,即使最有一个是静态的值,优化器也不会使用索引 比如: select * from employss where first_name||''||last_name='Beill cliton' 要写成 :select * from employss where first_name='Beill' and last_…