| Author |
Topic |
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2007-12-04 : 00:26:30
|
| Dear All,is there any difference performance wise using select * from my_tableandselect mycol1,mycol2....mycoln from my_tableactually i've read from one article the there is big difference....please clear my doubt...thanks in advanceVinodEven you learn 1%, Learn it with 100% confidence. |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-12-04 : 00:44:53
|
quote: Originally posted by sunsanvin Dear All,is there any difference performance wise using select * from my_tableandselect mycol1,mycol2....mycoln from my_tableactually i've read from one article the there is big difference....please clear my doubt...thanks in advanceVinodEven you learn 1%, Learn it with 100% confidence.
Unless you are querying every column in the table, there will be performance difference between the two queries. The articles you read would have explained why/where the difference lies...Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
 |
|
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2007-12-04 : 01:15:41
|
quote: Originally posted by dinakarUnless you are querying every column in the table, there will be performance difference between the two queries. The articles you read would have explained why/where the difference lies...
so using column names is better than using * ????????can you please give me some explanationVinodEven you learn 1%, Learn it with 100% confidence. |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2007-12-04 : 07:15:31
|
| "actually i've read from one article the there is big difference...."Re-read the article.[Signature]For fast help, follow this link:http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxLearn SQLhttp://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-12-04 : 07:19:06
|
| Let me ask you another question:Suppose you are going to market to purchase some fruits. You carry a single bag. Now tell me what is the difference if you buy 1 dozen of apples or if you buy 5 dozen of apples?Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2007-12-04 : 11:37:47
|
| If you are selecting every column then there is no real difference. However, if you do not need every column then you should not return every column. The real issue is that "SELECT *" is just bad form for production code. |
 |
|
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2007-12-05 : 00:18:02
|
| Thank you Experts...........i got the clarity.......and regarding the article....it is almost two years back i read the article.....that is why i dont exactly know how i found that one....any way i'm using all the columns in every statement...so i'm continuing with *.thanks a lot GURUsVinodEven you learn 1%, Learn it with 100% confidence. |
 |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-12-05 : 02:24:36
|
Some poeple would say "I use select * from table where 1=0" to know the structure of table MadhivananFailing to plan is Planning to fail |
 |
|
|
|