
数据库
get it now
有志者事竟成
展开
-
mysql查询优化手段
mysql查询优化手段汇总如下: 1、应尽量避免在 where 子句中使用!=或 2、对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。 3、应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如: select id from t where num is nul转载 2016-11-29 23:47:57 · 292 阅读 · 0 评论 -
去重表数据(oracle/DB2数据库)
首先建立测试表,并插入一些重复数据 --drop table testt; create table testt( t_id integer, t_name varchar2(20), t_age integer ); insert into testt values(1,'a',22); insert into testt values(1,'a',22);原创 2016-11-28 00:06:33 · 1844 阅读 · 0 评论