Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Why MDE file performance is much slower than MDB file?

Posted on 2006-03-21
12
Medium Priority
?
448 Views
Last Modified: 2013-12-05
I have an MDB file that converted into an MDE file.  With data the MDE file size is about 150MB.  About 90% of the application is driven by VBA and SQL statements.  How come it takes me about 10 minutes to process the data from the MDB file and it take about 10X as slow in the MDE file?  Is there a way to speed it up?

Thanks,
BT
0
Comment
Question by:babytam
  • 6
  • 5
12 Comments
 
LVL 39

Accepted Solution

by:
stevbe earned 200 total points
ID: 16250064
Often times when you compile into an MDE Access also decompiles your queries so the fierst time the queries are run the optimizers needs to do an anaysis. Do you get better performance the second time you process with an MDE?
0
 
LVL 1

Author Comment

by:babytam
ID: 16250169
No..it's always the same.  I use VBA to write  SQL statement and use Docmd.RunSQL to execute it.  Could this be the reason?

Thanks,
Tam
0
 
LVL 39

Expert Comment

by:stevbe
ID: 16250340
I am not sure that is causing your problem but if you can use saved queries and parameters you will get better performance.
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
LVL 1

Author Comment

by:babytam
ID: 16250421
I think that must be it.  I switched from Docmd.RunSQL sqlStatement to Currentdb.Execute sqlStatement and it ran way faster, as fast as the MDB now.  What's the difference between Docmd.RunSql and Currentdb.Execute statments?

Thanks,
Tam
0
 
LVL 39

Expert Comment

by:stevbe
ID: 16250481
I have never used Docmd.RunSQL but I *assume* there is lots of extra processing overhead.

if you want to run even faster you use DBEngine.Execute instead of CurrentDB. CurrentDB will force a refresh of all it's collections before executing whereas DBEngine just pops the SQL along. The obnly time you would need to be concerned is if you are creating tables and then you would either .Refresh the tableDefs collection or just use CurrentDB.
0
 
LVL 1

Author Comment

by:babytam
ID: 16250656
Do I need any special Reference file to use DBEngine.Execute?  I tried to switch to DBEngine.Execute and it gave me a compile error, Method or data member not found.

Thanks,
Tam
0
 
LVL 39

Expert Comment

by:stevbe
ID: 16250764
You need the Microsoft DAO Object 3.6 Library

Steve
0
 
LVL 1

Author Comment

by:babytam
ID: 16250887
I have that, but I also have ActiveX Data Objects 2.1 Library.  If I put DAO Object 3.6 library before ActiveX Data Objects 2.1 Library then I will get error for ADO syntax, and if I put ActiveX Data Objects 2.1 Library before DAO Object 3.6 then can't use DBEngine.Execute statement.  Do you have any recommendations?

Thanks,
Tam
0
 
LVL 1

Author Comment

by:babytam
ID: 16251057
Actually, DBEngine.Execute is not a recognized method whether I put DAO Object 3.6 Library before or after ActiveX Data Objects 2.1 Library.
0
 
LVL 44

Expert Comment

by:Leigh Purvis
ID: 16252128
(NOT for points - just popping in :-)

CurrentDb.Execute strSQL
Or
DBEngine(0)(0).Execute strSQL

:-)
0
 
LVL 1

Author Comment

by:babytam
ID: 16252411
DbEngine(0)(0).Execute works.  

Thanks,
Tam
0
 
LVL 39

Expert Comment

by:stevbe
ID: 16256597
Nice pickup Leigh ... I was typing too fast.

To address the order in which object libraries are referenced causing stuff to break ... If you fully qualify your object references it does not matter what order they are listed in.

DAO.DBEngine(0)(0)
ADODB.Recordset

etc.

Steve
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question