简体   繁体   中英

i have a oracle table EMP columns are NAME,AGE,DEPT

i have a oracle table EMP columns are NAME,AGE,DEPT.

now i want to retrive data from EMP using "select statement";

  1. Select Name, age, dept from Emp;
  2. select Dept, age, emp from Emp;

Which one will take less time to retrieve data?

Or will the retrieve time not be different?

you can use

Select Name, Age, Dept From EMP

Or if you have only Three columns in your EMP table than you also use

Select * from EMP.

both take same time..

in your question your second query is time consuming because you use, two time dept column in it.

for Better performance you can create index on EMP Table.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM