Which one of them is fast to execute?

  • Thread starter Thread starter ksandeep
  • Start date Start date
K

ksandeep

Guest
Hi,:cool:
Just had a query in my mind.
I have a table master_data with 16 columns.
so please tell me which one of the following would less time to execute.

1. select * from master_data;

2. select cust_name from master_data;

From the above example, i am interested to know, does number of parameters selected in the query effect the execution time.:)

Sandeep
 
Give it a try and see? ;-)

You can even call it from VBA, getting the time with a debug.print, running the SQL, then getting the time again.
 
I'm not sure you'll see a significant difference unless the table is large but that doesn't mean that you shouldn't use best practices. The accumulation of poor practices in an application ultimately reach critical mass and the application will be slower than it needs to be.

Best practice is to select the minimumn number of columns and the minimum number of rows whenever you create a query. Following this suggestion also leads to the best practice of using queries as the RecordSources for forms and reports.

If you decide to test the difference, I suggest that you include a sort since queries should almost always be ordered anyway. This way you will see the difference in pushing rows with hundreds of characters around vs pushing around rows with fewer characters.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom