Question

Performace Enhancements For Networked .MDB

Asked by: kkirt1

I have a rather large database (40mb) sitting on an NT server.  This database has three tables all of about the same size.  There are users who have links to these tables and those are the applications that are suffering.  We all know that their are better platforms than  Access for databases this size but for me, it is the easiest to work with so...

I want some "less-than-obvious" tips on how to increase the performance of this database and the databases that are linked to it.  I have tried the optimization wizard and have indexed the main tables.  

The best "tip" will be the accepted answer.  Thanks in advance for your ideas!

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
1999-09-21 at 09:28:30ID10209022
Topic

Microsoft Access Database

Participating Experts
7
Points
100
Comments
23

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. sql performace
    Some One know how oracle 8 execute the sql statements which are the order of the execution the sql statement form top to bottom or bottom to Top .How it evaluate the where conditions and how I build good sql statement to improve the performace???
  2. Optimizing
    Hi There, I was reading a note in a job advertisement and it mentioned the need to know how to optimize tables and pages to load fast, they referred to it as production code. I know about page size and such, but what are they talking about when it comes to optimizing tables ...
  3. Delphi and MDB's
    Hi, I have reached a point in programming where I am thoroughly annoyed with the BDE and paradox. I know you can use MDB files instead, and SQL. Could somebody please point me in the direction of tutorials or show me how to configure delphi to use MDB files and perform quer...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: kkirt1Posted on 1999-09-21 at 09:28:56ID: 2063398

Edited text of question.

 

by: berg1375Posted on 1999-09-21 at 09:57:34ID: 2063495

Have you tried scheduled epair and compacts? I had a problem similar to this. I took some unnecessary queries and converted them into recordsets (they perform faster on large tables), I also do regular repair and compacts on the backend.

I assume you have the users front ends in their hard drives, if not, I highly recommend it.

HTH
berg

 

by: wesleystewartPosted on 1999-09-21 at 09:58:22ID: 2063496

kkirt1:

Be careful not to over-indx your tables.  This can slow performance to a crawl.

What are your users doing with the linked tables?  If they are using poorly-constructed queries to gather data from the linked tables, it isn't the fault of the tables themselves.

How is your network performance overall?

Wes

 

by: kkirt1Posted on 1999-09-21 at 12:25:21ID: 2063948

bERG1375:  I do regular compacts and repairs and the users have their applications loaded locally.  
I don't see any queries that can be dumped into a dataset but that is a good idea.

wesleystewart:  The tables do have several indexes but nothing that I would consider excessive.  
The users are doing very basic queries, nothing real complex so they probably can't screw them up.  
The users link to a table that is batch updated from the main-frame every week.  

Tmess:  Good links, but I didn't see anyhting I haven't already tried.  Thanks anyway!

 

by: jkpcsPosted on 1999-09-21 at 12:30:50ID: 2063965

Also,

(provided your data is normalized and your table architecture is sound)
Keep the number of dynasets to a minimum and use snapshots wherever possible.
I know this is obvious, but be sure your network is optimal.
Be sure your client apps are in a fully compiled state.

 

by: berg1375Posted on 1999-09-21 at 12:38:24ID: 2063983

Also, I had to replace the links from UNC to straight drive links. That upped the time of one of my db's. I don't know if that applies to you, but it's a fix I had.

berg

 

by: TmessPosted on 1999-09-21 at 13:12:28ID: 2064093

Another tip: Access is not a true client server even if you have a front end with linked tables and a backend with tables on a server. When a request is sent out (sql statement or through linked tables) to the backend on the server, Access returns all the tables to the client and then processes the SQL. This is where access is slow.To make Access a better client server you need to create an "SQL middleman". This middle man would be an ActiveX exe (you can make one in VB)whih would reside on the server in the same folder as the mdb. What you would do is send your sql from the client to the middleman. It would then send the sql statement to the mdb on the server. Here's where the speed factor increases. The mdb wouldn't have to copy itself to the client. Instead it would copy itself on the server and send the result set to the axtiveX exe. Then the middle man would send the results back to the Client.

 

by: kkirt1Posted on 1999-09-21 at 13:57:16ID: 2064214

jkpcs:  When I wrote "applications" I meant that they have Access running on thier desktop machines. This is not a run-time Access issue.  The users have to have the flexibility to create their own queries and reports.

berg1375:  I don't understand!  I didn't know there were different ways to link tables.  Please explain.

Tmess: Yes, unfortunately that is the limitation of Access.  I would like to explore this ActiveX "middleware" you are talking about.  Could it be invisible to the users?  That is, could they link to a table just like they do today and run queries from those tables? Do you know where I could get an example of the ActiveX control?

Another thought I had, and I'm not sure it is applicable here, is changing the way access caches data.  Can designers instruct Access to bring these tables over from the network and keep them cached?  This would make multiple queries against the same tables much faster.

What about Access 2000 with its dual database engines.  Would that be a solution for this problem?

 

by: wesleystewartPosted on 1999-09-21 at 14:19:22ID: 2064268

kkirt1:

I think there has to be a tweak somewhere that we're missing.  I have several databases over 40 MB and a few into the 250-300 MB range that work fine as back ends.  A few more things you might want to check:

Are your users using the LIKE operator on text or memo fields?

Is anyone using the IIf() function in a query?  That will kill performance.

Are the fields most often used as criteria indexed?

 

by: TmessPosted on 1999-09-21 at 14:22:05ID: 2064273

1. The activeX exe you could create with VB. However, I didn't know users could create queries and manipulate the objects. It would be very difficult to apply an AxtiveX exe because there would be too many variables involved.

2. Caches recrods - Actually Kkirt, a designer could do that however it would be very difficult. I know this can be done in with ADO. However, user won't be able to see added, deleted, or updated records. But again, the biggest problem is that the user is allowed to create tables and the like.

What you could actually do is that when the user open their database, you could copy the entire db from the network and put it on the client. Your frontened could then link to those tables from the mdb that was created on the client. This would create substantial overhead when the user open the mdb. This would allow user to create queries and reports. The only problem with this is that if the user updates, Adds or delete records. How would add, update, delete these records to the netwrok mdb when the user closes out of the mdb. Every record would have to be compared to the one of the records on the network to determine what was changed. It would be very difficult but it could be done.

There seems to be a lot of possiblites

 

by: P1Posted on 1999-09-21 at 14:28:23ID: 2064290

If these are static data dumps from the mainframe.  Write a batch file to 're-fresh' the data locally to the hard drive ( 40 mb is not much these days ), each time the user uses the app.  You then, cut out the network data requests completely.

 

by: P1Posted on 1999-09-21 at 14:41:25ID: 2064311

If these are static data dumps from the mainframe.  Write a batch file to 're-fresh' the data locally to the hard drive ( 40 mb is not much these days ), each time the user uses the app.  You then, cut out the network data requests completely.

 

by: JimMorganPosted on 1999-09-21 at 15:20:42ID: 2064395

I just spent a bunch of time writing this comment only to have my system crash.  So I won't write so much this time.

The key is how you handle your queries.  Take advantage of the optimization built into the Jet engine by making all your queries stored.  Unless I have to change parameters on the fly in code, I never use SQL statements either in modules or as properties for forms, controls, etc.

Teach you users the proper way to use the query builder to make queries.  After they have the query running the way they want, save the query and immediately run it.  As a matter of fact before you deploy an application, go through every query, open in design mode, save, then run.  This will force Jet to reoptimize (compile) the query.

As your data gets larger, you need recompile all the queries so that they can remain optimized.  For the local Access program, since the users are making their own queries and reports, how are you handling keeping those separate from the non-date portions of your application?  If their queries and reports are integrated in with the forms and code, then you need to write a routine which will go through the querydefs, open each in design mode, save, and run to force recompiling.

After this the local database must be repaired and compacted.  Are you doing this to the local databases as well as the server data databases?  This is also an overlooked area of slow down.  The local databases can get quite blooted and take up precious resources.

Jim

 

by: berg1375Posted on 1999-09-22 at 05:29:55ID: 2065890

When I say UNC names I mean something like this:

\\JCKFRH01\Data\Shared\Apps\File1\Sample.mdb

This would go through the network neighborhood each time.

I changed it to x:\Apps\File1\Sample.mdb

After mapping their drives to what I wanted. Like I said it may not be an issue for you, but it is something to be aware of.

berg

 

by: kkirt1Posted on 1999-09-22 at 06:31:04ID: 2066067

wesleystewart:  I agree.  Our network isn't the most efficient but it seems to run pretty good.  Define "work fine."  On a simple select query I run from my system that is linked to tables on the network it can take 20 - 30 seconds to run.  Is that "work fine?"

As far as putting the .mdb on the clients, we tried that before and it was dragging the network down and users were forgetting to update it so at this point I don't think that is an option.

Jim:  Sorry about the system crash - I hate when that happens.  I am a little confused about optimization.  Doesn't access optimize the SQL statement everytime it is ran?  What are "stored" queries?  None of the sql statements I am using reside in VBA code.  The users that access these tables only use the most basic sql statments.  Also, I repair and compact the .mdb every week after the download.

berg1375:  All of the users have the network drive where the .mdb is located permanently mapped.


 

 

by: wesleystewartPosted on 1999-09-22 at 08:42:35ID: 2066509

How many records are you returning, and how many records are in the table you're querying?

 

by: kkirt1Posted on 1999-09-22 at 09:12:08ID: 2066615

There are about 22,000 records each in two tables.  The returned records vary but almost never are they more than a few hundred.  

What surprises me was that I just went to the .mdb on the network, clicked on the tables and I got a record count within a second or two.  Why is it taking so much longer to query those records.  I'm not that knowledgeable about networks but it would seem that that few seconds was the table coming across the network.  After that transfer, It should run pretty quickly because resident databases I run just smoke!  Am I thinking about this right?

 

by: berg1375Posted on 1999-09-22 at 09:26:19ID: 2066654

Just a comment here. We had a similar problem, with an app that used a java frontend on an access db. It ran good elsewhere, but in our facility it was slow as dirt. It turns out one of the routers was pointed wrong. They fixed that router, and now it flies.

Just posting an experience, probably doesn't apply to you :)

 

by: JimMorganPosted on 1999-09-22 at 11:51:08ID: 2067071

What is a stored query?  This is faster to answer.  A stored query is a query which is stored in the database file folder under Queries.  You don't have to use VBA code to have what I call and unstored query.  For example, you add the row source for a combo box.  If you click the ellipse for the row source property, you are put into the query builder.  After you have built your query (SQL statement) to your satisfaction and close the builder, Access asks if you want to save the changes and update the property.  Choosing Yes does not create a stored query under the Queries tab of the database.  According to some, this is a good as a stored query but it is very difficult to go through all of your forms and controls searching for an imbedded SQL statement vs looking under the Queries tab.

Supposedly, Jet works the same way for either query but until you actually run the query for the first time, it is not optimized.

What is optimization?  Do you want the short version or the long version? :-)

Jet looks at all the parameters for the query and tries to use a technology called "Rushmore" to preset up the query parameters (internal to Access and Jet).  Without going into a detailed explanation about Rushmore, it is a data-access technology that can help improve processing queries.  However, a query must be constructed in a certain way for the query to benefit from Rushmore.

In the process of optimization, Jet looks at the sizes of the tables involved in the joins and the number of fields that are extracted.  (For complete and highly technical explanation see "Jet Database Engine Programmer's Guide" from Microsoft Press.)  It then arranges internally which table is going to pull first and how the comparison will work against other tables.  As an example, if you have three tables: one with 100,000 records, two with 1000 records and the third with 50 records, it doesn't make much sense to take the 100,000 records and compare each against the product of the 1000 record and the 50 record table.  If the 1000 and 50 record tables are evaluated first, there may be a small number of matches or no matches.  The product of those tables are then compared against the 100,000 record table.  However, the query as written, if taken at face value, might ask for the 100,000 table to be the table to match the other.  Jet uses enough intelligence to do it the other way.

Lets say that the 1000 and 50 record table are system tables and will not grow much.  The 100,000 record table are transactions.  When the application is first run, the transaction table will have no or few records and be the logical one to start with.  So intitially that query is optimized that way.  But as the transactions grow, this is not the best way.  So you have to force Jet to recompile the queries so it can take into consideration the increased records in the transaction table.

Imbedded or non-stored queries, especially those in code, will be seen by Jet as a uncompiled query and everytime that they run, Jet will attempt to go through the optimization process.  This takes time and resources.  Considering how ofter queries are used, this could slow an application down to a factor of 2000 or 3000 times slower.

Let me give you a brief primer on how to improve queries performance:

Index fields on both sides of a join.

Add only the fields you need in the query results.

Add as many indexes as possible, which will slow down inserting, updating, and deleting records but sometimes the tradeoff is worth it.  (I know.  Too many indexes can really slow down the system.  You have to experiment here.)

Always index on fields used in the criteria of the query.

Compact the database often.  During compacting, Access tries to reorganize the table records to they are in contiguous spaces, ordered by the primary key.

When running a multitable query, test to see whether the query runs faster with the criteria placed on the "one" side or the "many" side of the join.

Avoid adding criteria to calculated or nonindexed fields.

Select the smallest field types for the primary key.  Don't use the company name instead of a long integer CustID.

Avoid calculated fields in nested queries.  If possible add the calculations to the highest level query.

If expressions can be handled in form or report controls, do them there rather than in the query.

When using LIKE in a query criteria, placing the asterisk at the end of the string so the index can be used.

Use Count(*) rather than Count([FieldName]).

User Group By as little as possible.  If possible, use First instead.

Use Rushmore whenever possible.  The following help in setting a query that can use Rushmore:

   Queries with a NOT operator can't be optimized.

   The Count(*) function is highly optimized by Rushmore.

   Descending indexes can not be used by Rushmore unless the expression is =.

   Queries on ODBC data sources can't use Rushmore.

   Multifield indexes can be used by Rushmore only when the criteria is in the order of the index.  For example if an index is LastName - FirstName, an expression based on FirstName only can't use Rushmore.

There are a lot more things that you can do and it takes a lot of research, reading, and playing with various combinations to just optimize queries.  I really feel that most of your problems are associated with queries.

Also, using Access with no code modules will work and is supposed to run faster, however there are some things that can be done in code which will almost always make the application run faster.  Code is sort of like fine tuning.

Jim

 

by: bruintjePosted on 2002-04-07 at 13:31:20ID: 6924164

Hi kkirt1,

Any update on this question?

in an effort to clean up old open questions

your options are:

1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the
participants why you wish to do this, and allow for Expert response.  This choice will include a refund
to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information
outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with
details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
 --> Post comments for expert of your intention to delete and why
 --> You cannot delete a question with comments, special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below, include the question

QID/link. http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

Please click this Help Desk link for Member Guidelines, Member Agreement and the Question/Answer process:
Click you Member Profile to view your question history and keep them all current with updates as the
collaboration effort continues. http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

------------>  EXPERTS:    Please leave any comments regarding this question here on closing recommendations
if this item remains inactive another seven (7) days.

:O)Bruintje

 

by: kkirt1Posted on 2002-04-07 at 15:39:41ID: 6924302

All were good answers but... I have to pick one!  Thanks to all who responded!

 

by: bruintjePosted on 2002-04-07 at 21:49:42ID: 6924603

Hi kkirt1,

Thanks for finalizing this question
It makes Experts-Exchange work

:O)Bruintje

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...