Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Faster approach for querying

This is a discussion on Faster approach for querying within the Database General forums, part of the Databases category; 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 ...

Go Back   Geeks Talk > Databases > Database General
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read

Database General Database common Questions

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-04-2008
Junior Member
 
Join Date: Jan 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
zakirhere is on a distinguished road
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..
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-18-2008
Moderator
 
Join Date: Jun 2007
Location: Bangalore,India
Posts: 1,853
Thanks: 9
Thanked 168 Times in 142 Posts
debasisdas has a spectacular aura aboutdebasisdas has a spectacular aura about
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.
Reply With Quote
Reply

  Geeks Talk > Databases > Database General

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Which frog is faster? jamesravid Aptitude Skills 13 01-29-2009 02:37 AM
Which is faster Geek_Guest SQL 4 09-30-2008 07:12 AM
What approach you will follow? jainbrijesh Analytical Skills 13 07-09-2008 11:24 AM
Best approach to check GUI gauravsoft QTP 1 11-21-2007 09:41 AM
What approach should I take sunnysunny57 Career Advice 1 10-25-2007 03:43 AM


All times are GMT -4. The time now is 06:05 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved