07-10-2008 3:35 PM
Hi
I have some performance issues in my select query.
Here in table it is having around 80 fields, i want retrieve all these 80 fields. so here i wrote select query is select * from, Because here i am retrieving data all these 80 fields.
If i specify all 80 fields in select query is it improve the performance?
Please tell me.
Thanks.
07-10-2008 3:38 PM
no.
if you specify only the fields, which you really need, than it will improve in performance. If you really need all 80, than you have no choice...
07-10-2008 3:38 PM
no.
if you specify only the fields, which you really need, than it will improve in performance. If you really need all 80, than you have no choice...
07-10-2008 3:38 PM
I don't think it will improve.
If the number of fields to be fetched is reduced, then there may be some improvement, but other wise, it depends upon the order of fields in the where condition more than anything else.
Regards,
ravi
07-11-2008 4:57 AM
HI,
It is not going to anyway improve ur performance...select * and metioning those 80 fields is the same.
if u are using < 80 fields(significantly less) ..i would say u better specify them,..otherwise, its of no use. are u really using those 80 fields in your program ??
regards,
madhu
07-11-2008 8:04 AM
that is completely useless.
And it is anyway not the number of fields which counts, but the size in bytes. There are probably many tables with less but larger fields.
You can only expect to improve if if you are able to reduce the size substantially.
But if your access is otherwise fast and if you read only what you really need, than it should be no problem, actually it is be definition as good as possible.
Siegfried
07-11-2008 9:05 AM
Hi Siegfried Boes,
Thanks for your answer.
Here I want only Performance means fast accessing.
Total 80 fields i am retrieving, So shall i specify 80 fields or Select *?
Which one is correct?
Please tell me.
Thanks.
07-11-2008 9:13 AM
sepecifying 80 fields and using select *
makes NO DIFFERENCE. it is one and the same in your case.
regards,
madhu
07-11-2008 11:29 AM
How many fields are in the table you speak of? If for example there are 81 fields then there won't be much difference between SELECT * and selecting 80 of those fields. Your performance is more likely due to the WHERE clause in your query, the structure/indices of the table, and how many entries are in the table you are selecting from.
It may help if you post the query here...