Showing posts with label notethat. Show all posts
Showing posts with label notethat. Show all posts

Tuesday, March 6, 2012

Access takes 24-35 seconds while SQL Server takes only 2-3 seconds

I test my C# applicaiton both with Access and SQL Server database. I note
that the following code snippets takes 24-35 seconds with Access database
while takes only 2-3 seconds with SQL Server to fetch same number of records
(80,000 records).
//with Access Database
this.da = new OdbcDataAdapter("select Barcode, Description from
Items_Detail", DB.cn);
//with SQL Server
this.da = new SqlDataAdapter("select Barcode, Description from
Items_Detail", DB.cn);
//common code
this.da.Fill(this.ds, "Get_Quantity_Result");
grd_All_Recs.SetDataBinding(this.ds, "Get_Quantity_Result");
for my customer simplicity i want to give him solution with Access database
but with this un-acceptable delay i can't do this.
Please help in identifying that why it is taking much time to fetch records
from Access database.
Arif.Why Access? Why not SQL 2005 Express or SQL 2000 MSDE?
SQL Express and MSDE are free with most benefits of regular SQL Server
editions.
http://msdn.microsoft.com/library/d...r />
rview.asp
http://msdn.microsoft.com/library/d...br />
67ax.asp
ML