User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 391,996 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,205 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 2096 | Replies: 3
Reply
Join Date: Mar 2006
Posts: 2
Reputation: OnlyTruth is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
OnlyTruth OnlyTruth is offline Offline
Newbie Poster

Help Fast retrieving of records

  #1  
Mar 8th, 2006
Hi,

I am having a table with 16 lakhs records in it. Each record contains approximately 50 columns. I am using MSSQL Database. Basically the table contains details of the user's registration details. I have a application built in VB.net which will be selecting a random user_id and then searches for the record which contains that particular id and retrieves the details . The user_id column in my table is set as primary key. My Query is as given below:

SELECT * FROM user_Table WHERE user_id=MyNumber

The value for MyNumber is passed from the application. The problem is that the application takes much time to execute this query.(almost 15 secs for per 1000 users) which is very slow. I need to increase the speed by atleast 50-70%. Currently I am using ADODB recordset for this query. I have also tried using datasets but no improvement in the speed. Is there any way to optimize the SQL Server's performance or do I need to change my query. Please Help...
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2005
Posts: 175
Reputation: Letscode is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 5
Letscode's Avatar
Letscode Letscode is offline Offline
Junior Poster

Re: Fast retrieving of records

  #2  
Mar 8th, 2006
Is userID declared as a primary key?(In order for it to have an index)
R U using somekind of a stored procedure to get the values?
Save White Tiger
Reply With Quote  
Join Date: Mar 2006
Posts: 2
Reputation: OnlyTruth is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
OnlyTruth OnlyTruth is offline Offline
Newbie Poster

Re: Fast retrieving of records

  #3  
Mar 11th, 2006
Ya, The Userid is declared as primary key. I m not using any stored procedure to get the values. I m using ADODB recordset for querying the table. I have tried using stored procedure but the speed was almost same n the other thing is that the dirty value in the procedure cache goes on increasing. Thats why i switched back to my recordset method. I wanted to know whether there is any method of logically partioning the table so that the query retrieves data quickly.
Thanks For Ur Reply buddy...
Reply With Quote  
Join Date: Jul 2005
Location: Dallas, TX
Posts: 481
Reputation: campkev is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

Re: Fast retrieving of records

  #4  
Mar 27th, 2006
how long does the query take to run if you run it from query analyzer?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MS SQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MS SQL Forum

All times are GMT -4. The time now is 9:59 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC