|
-
Aug 6th, 2000, 12:32 PM
#1
Thread Starter
Hyperactive Member
Hi,
I've noticed that most SQL examples on this and other sites begin with Select * from ... even if only a few fields are needed.
Many moons ago I was taught to explicitly select only the fields that you wanted to retrieve as this would reduce the overhead required to perform the query and greatly increase the speed.
Is this still true?
Thanks,
Al.
A computer is a tool, not a toy.
-
Aug 6th, 2000, 01:05 PM
#2
Monday Morning Lunatic
Yes, but it's often easier in some situations to collect the entire set of fields. It's also not that different in time now, with todays processors. Although I still notice .
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 6th, 2000, 02:09 PM
#3
Guru
I would say that it is mostly out of laziness. Usually we are trying to prove a point OTHER than how to select individual columns, and using a * instead of individual field names makes the statement easier to read.
In practice, select only the fields you need (but we all get lazy sometimes, and as always, there are trade-offs involved no matter what you do)
-
Aug 6th, 2000, 02:21 PM
#4
Monday Morning Lunatic
Laziness...Isn't that one of the virtues of a programmer?
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|