Showing posts with label 24-35. Show all posts
Showing posts with label 24-35. 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

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

Dear ML,
with my simple application i want to embed Access database file in my setup
file for simplicity as my customer requested me.
can you tell me the reason of my problem. one of my friend told me that he
used Access database with his VB6 application having approximately same
number of records but the speed was good. But we can't find the problem that
in my case why it is taking time with Access database.
Arif.
"ML" wrote:

> 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.../>
verview.asp
> http://msdn.microsoft.com/library/d... />
s_67ax.asp
>
> MLIt's difficult to pin point the exact reason for such poor performance, yet
there are many reasons why not to use Access. :)
Especially in your case. You're designing a simple application, you say. I
guess you're also providing the front-end. That's exactly the typical
use-case involving MSDE or SQL Express.
As far as the performance question goes, maybe you can find some help in a
MS Access news group.
ML|||dear ML i got the idea from MS Access new group to try using OleDB Data
provider instead of ODBC data provider.
i implemented this idea and i get very good performace near to SQL Server.
arif.
"ML" wrote:

> It's difficult to pin point the exact reason for such poor performance, ye
t
> there are many reasons why not to use Access. :)
> Especially in your case. You're designing a simple application, you say. I
> guess you're also providing the front-end. That's exactly the typical
> use-case involving MSDE or SQL Express.
> As far as the performance question goes, maybe you can find some help in a
> MS Access news group.
>
> ML|||Yeah! That's the way to go.
ML