-
Junior Member
Faster approach for querying
Which will be faster approach, querying one time or many times into database?
I'm a programmer and always follow the standard method to access database like getting all records at once in recordset and then playing with it. But it takes times to load data having thousands of records(in my case takes upto 31 secs).
Now I heard that it will be faster if we query the database many times to retrieve records when required(or some records). Also by doing so It will takes only few seconds to get the same job done. But only difference is that I am querying the database multiple times
To summarize, should we query once or multiple times for achieving the goal without hampering the system and importantly application?
Which way is better?
Thanks in advance..
-
Re: Faster approach for querying
The answer is "it depends"
It is always better to query the database less number of times and fetch from buffer.
But if you have proper indexing then u can query the database more . BUt it is still recommended to go for less database calls to avoid excess disc I/O.
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