为什么不要使用 select * from xxx (oracle 亲测)

Posted bailaowu

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了为什么不要使用 select * from xxx (oracle 亲测)相关的知识,希望对你有一定的参考价值。

打开已用时间
set timing on;
create table users(id number(20), name varchar2(20), password varchar2(20));
insert into users values(111111111111111, ‘爱新觉罗·启星‘, ‘[email protected]‘);
insert into users(id, name, password) select * from users; // 插入32768条数据
select * from users; 用时40.58秒
select name from users; 用时23.34秒
select * from users; 用时38.58秒
select name from users; 用时23.91秒
select * from users; 用时39.47秒
select name from users; 用时24.28秒











以上是关于为什么不要使用 select * from xxx (oracle 亲测)的主要内容,如果未能解决你的问题,请参考以下文章

django查询1列。怎么查询一列,和select name from a。一样

解决java.sql.SQLException: null, message from server: “Host ‘XXX‘ is not allowed to connect异常

“JSON parse error: Cannot deserialize value of type `java.util.ArrayList<XXX>` from Object value ...

java.sql.SQLException: null, message from server: “Host ‘xxx’ is not allowed to connect

Mybatis Error attempting to get column 'xxx' from result set. Cause: java.sql.SQLDataExcepti

Mybatis Error attempting to get column 'xxx' from result set. Cause: java.sql.SQLDataExcepti