Access database with 800,000 records (small ones)

Hi,

I have a simple database of perhaps 10 tables.  
The tables are all small except one (tblBig) which has 10 fields and 800,000 rows.

When I use a form that accesses tblBig all works fine on my personal PC.
However, when my client puts the database on their server it is taking 3 minutes to read ONE record!

The table is indexed on the key field.
How can I make the system faster when reading this table?? Perhaps the solution is on their server and NOT my database??

Any suggestions?
Patrick O'DeaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Patrick O'DeaAuthor Commented:
Just a thought??
The primary index is a "text" field.
Would it be quicker if it was a numeric field.   (I might be able to change it to numeric)
0
Kelvin SparksCommented:
How do you select a row in the database? There are quick and slow ways to do that.


Kelvin
0
Kelvin SparksCommented:
What you have to avoid is having the form load all 800,000 records to the form. I've had Access db' with 6 million records in a table and could load a record in a few milliseconds

Kelvin
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Patrick O'DeaAuthor Commented:
Thanks Kelvin,

The users key in ONE "primary index" and the record is displayed.
i.e. One index is keyed and one record is displayed.

As mentioned it works instantly on my laptop but takes minutes on their network.

Do you think I should change the primary key to a numeric?
 (it is currently a text field but 99% of records are numeric).
0
Kelvin SparksCommented:
The data type is probably not the issue. What code is executed after you type in the primary index?
0
hnasrCommented:
1. Try to run the Performance Analyzer on the database.

     Database Tools Tab > Analyze > Analyze Performance Command

2. Try with a copy of the database, removing all records but a few. See if get any improvements.
0
Dale FyeCommented:
So, they have to type in the entire primary key into a textbox?  How do they know what the primary keys are?
0
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Is your Form bound to a table/query? If so, can you provide the SQL of that?

Are you dealing with any Memo or OLE fields? Those can cause slowdowns at times.

If you place a copy of the FE directly on the server and link it, and THEN run the application, does the application respond? If so, then network issues are in play, and those would have to be resolved.
0
clarkscottCommented:
On your pc will be much faster because you're not going through a network.  I'm assuming these folks keep the tables somewhere on a shared folder.

Now, is your application split between the tables and everything else?  In other words, are your tables in their own accdb/mdb and you have a "front-end" that links to these tables?  That's the way it should be.

Further, make sure each of your users download the "front-end" to their own PC.  It's a simple setup - open up your front-end on their system and link to the tables on the server (use the \\servername\... method - not a mapped drive letter).
Now, simply copy the front-end to your user's PCs.

This still won't be as fast as having the tables on your own hard drive... but that's reality.

Scott C
0
clarkscottCommented:
Further.... if your tables get too large - split them up each in their own accdb/mdb.   Each table can then be 2 gig in size (Access size limit) and your front-end can link to as many of these as you need.

Of course, you can't use referential integrity if the tables are not in the same accdb/mdb, but (as I do) you can write a few queries to determine whether or not the user is allowed to delete a "parent" record.

Scott C
0
PatHartmanCommented:
You also need to compact the BE and FE regularly.  Compacting the BE reorganizes the tables and puts them back into primary key order as well as getting rid of deleted records.  Compacting the FE decompiles all the queries so the next time you run them, Access will calculate a new execution plan.  The most efficient way to actually retrieve the data could change over time if indexes are added/deleted and row counts change.  So, if a table starts out very small, Access may decide to load it into memory and work with it that way but as it grows, Access may choose to use an index instead.

If you don't have indexes on common search fields, add them.

Do not use Filters.  Instead, use queries with selection criteria.  It takes a little more work initially but is much more efficient and will give significantly better results if you upsize to SQL Server.  Always retrieve the minimum amount of data with each query.  No user is going to look at 800,000 rows so don't bring them across the network.

Switching  to SQL server could make the app even slower (Jet/ACE are really super fast) unless you have used proper client/server methods such as what I have already mentioned.  If you open a form bound to a table or a query without criteria, Jet/ACE will bring over 800,000 records and so will SQL server but Access will probably do it faster so always make sure you use queries with criteria.  Filters don't work because filters are applied locally.  The whole recordset is retrieved and then filtered once it is loaded on your computer whereas where clauses are sent to SQL server and ONLY the REQUESTED rows are returned so you have complete control over your network traffic.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Patrick O'DeaAuthor Commented:
Thanks all for help.

I have applied a variety of your suggestions and have worked a solution.

I learn every day!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.