Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 246
  • Last Modified:

query optimization

Hello experts,

I am using the access database. I have one table with 20,000 records and when i am using the query select * from tablename from .aspx page with C# then system is taking too long to execute the query.

What is the best possible way to fetch the records.

Any helping hands will be greatly appreciated.

Many thanks
0
dotsandcoms
Asked:
dotsandcoms
1 Solution
 
Dale BurrellCommented:
Change to SQL Server Express :)

How long is it taking and what are you doing with the records? If you are trying to display that much data it will take a little while...
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
You could either select less records by adding a WHERE clause or select less columns, only the ones you need, like this:

select col1, col2, col4
from tablename
where col3 > 1000;
0
 
Moizsaif123Commented:
you can opt to use temp tables to view the data through a stored proc, check out the site below...

http://www.sqloptimizationsschool.com/Pages/Basic%20Concepts/Temp%20Tables.aspx
0
 
käµfm³d 👽Commented:
Have you tried compacting the file lately? Sometimes running an Access DB for a length of time can bloat the file and cause queries to slow.
0
 
dotsandcomsAuthor Commented:
good solution
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now