View Single Post
Old Aug 9th, 2006, 11:58 PM   #1
King
Professional Programmer
 
King's Avatar
 
Join Date: Jan 2006
Location: Ontario, Canada
Posts: 368
Rep Power: 0 King is an unknown quantity at this point
SQL Select Statement Performance

This is probably a dumb question, but I’ll ask anyways. I have an application that has a GetAll() function that gets all the records from a Customer table in a MS Access database. I just use a select statement that looks like this:
SELECT * FROM Customer;
I use this function a fair bit throughout my application for different things. Sometimes I only want the first and last name from the record; so should I make another function for this and go:
SELECT FirstName, LastName FROM Customer;
Would doing this make all that much of a difference performance wise, because if it doesn’t I won’t bother changing it in my code. There are about 10 other fields in the Customer table other than FirstName and LastName, so I was thinking maybe if it only had to get the two fields it my save some time a bit of memory. What do you guys think?
__________________
I am Addicted to Linux!
King is offline   Reply With Quote