943,649 Members | Top Members by Rank

Ad:
  • MS SQL Discussion Thread
  • Unsolved
  • Views: 3402
  • MS SQL RSS
Mar 8th, 2006
0

Fast retrieving of records

Expand Post »
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...
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
OnlyTruth is offline Offline
2 posts
since Mar 2006
Mar 8th, 2006
0

Re: Fast retrieving of records

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?
Reputation Points: 11
Solved Threads: 6
Junior Poster
Letscode is offline Offline
175 posts
since Feb 2005
Mar 11th, 2006
0

Re: Fast retrieving of records

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...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
OnlyTruth is offline Offline
2 posts
since Mar 2006
Mar 27th, 2006
0

Re: Fast retrieving of records

how long does the query take to run if you run it from query analyzer?
Reputation Points: 14
Solved Threads: 19
Posting Pro in Training
campkev is offline Offline
484 posts
since Jul 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MS SQL Forum Timeline: Timecard Export to SQL in Infopath
Next Thread in MS SQL Forum Timeline: DB Schema Export/Import Help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC