Forum Discussion
Why is Access so slow?
- Nov 11, 2021
Ouch. That's my mistake. I forgot to ask about the size of the recordsets involved.
Loading that many records will be slow, IF you load them all at once into a form's recordsource.
I think that explains it in a way.
When you first open a form bound to one of those tables, Access loads only a small percentage of the whole, enough to show an initial display. Then it begins loading the rest in the background. If you ask for all of them, by moving to the "last" record in the recordsource, it has to retrieve hundreds of thousands of records to do that. Improperly, or inadequately, indexed tables are even more of a problem in that situation. And forms with lots of combo boxes or list boxes or subforms are also problematic in that regard.So, the solution would be to avoid ever loading all of the records in a table unless you have some specific reason, such as an aggregate query that needs to display the entire history of the transactions in a 430,000 record table.
Start with a single record. Offer a way to select a different record when needed and load only that record. And so on.This kind of problem also reflects the fact that an initial stage relational database application may contain only a small number of records, and hence the problem of mass loading is not obvious. Over time the number of records in the tables grows and the problem makes itself apparent.
Moving the data to SQL Server should help in allowing the Server to manage those huge recordsets, but I'm surprised that it completely disappears.
Again, my apologies for not thinking through all of the possibilities, including this one.
George_Hepworth What do you mean by persistent connections? It is Access back end on a file server on premises. I am currently in the process of converting it into SQL but that is going to take me a while so I was looking for a quicker fix. We have probably 10 users connected at all times.
Here's a link to a good overview discussion of performance, including the use of persistent connections.
- Lateralusx777Nov 09, 2021Copper ContributorI will look into that. Our files always have the lock when open though so idk if this is already happening.
- George_HepworthNov 09, 2021Silver Contributor
Lateralusx777 The existence of the locking file isn't the same thing.
It only records who has opened the accdb/mdb and when they close it. When a user attempts to use a linked table, as in opening a form, Access has to reestablish a connection to the data. If one is currently open and available, that isn't necessary. Hence, the importance of a persistent connection.
- Lateralusx777Nov 09, 2021Copper ContributorOk I will try to set that up when I have some time to. Thank you for the input and assistance. It is very much appreciated.