Oracle query performance

A) I have 100 columns in emp table , which of the below queries will give good performance and WHY?

1) Select * from emp;

2)select col1,col2,col3,..............col100 from emp;


B) we have 2 tables T1(100 records) and T2(1000) records

When we use the below queries , it will generate Cartesian product , which query will give better performance and WHY?

1)Selct * from t1,t2 ;
2)select * from t2,t1;

Questions by mailtonagaraja   answers by mailtonagaraja

Showing Answers 1 - 6 of 6 Answers

set time on

then

write the query then execute display output and timing..

then write set time off
write same query then execute display output ,compare both timing it is called query performance

  Was this answer useful?  Yes

DSADSF

  • Sep 24th, 2011
 

SELECT * FROM T1,T2
WHERE T1.COLUM_NAME=T2.COLUM_NAME;

NOTE THAT COLUMN NAME AND DATA SHOULD BE SAME

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions