|
SincerePrayer
|
Feb 14 2006, 05:15 PM
|
love to pray
|
nxfx, Is definitetly the second approach. The reason behind is - The server does not need to return the whole set of records back to the client and will never use by the client
- The server does not need to lock the whole returned records for the purpose of adding
- The round trip between server and client are lesser. Hence, the time needed is lesser.
Happy Coding
|
|
|
|
|
|
SincerePrayer
|
Feb 15 2006, 10:23 AM
|
love to pray
|
nxfx, Yes, the database server will conduct a search and some processing on this empty SELECT. You won't see much performance hit on small application; but you will see big performance impact on multi-user and multiple hit application. This is good have a good habbit in writing good code. Remember, this tiny habbit does affect your programming skill and how people look at your skill. Happy Coding
|
|
|
|
|