GeekInterview.com
Series: Subject: Topic:
Question: 13 of 190

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;
Asked by: mailtonagaraja | Member Since Apr-2009 | Asked on: Mar 23rd, 2011

View all questions by mailtonagaraja   View all answers by mailtonagaraja

Showing Answers 1 - 2 of 2 Answers
nandha_spartan

Answered On : Aug 18th, 2011

View all answers by nandha_spartan

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

  
Login to rate this answer.
DSADSF

Answered On : Sep 24th, 2011

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

NOTE THAT COLUMN NAME AND DATA SHOULD BE SAME

  
Login to rate this answer.

Give your answer:

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

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.