Emmanuel Katto Dubai : About MS Access Performance Issues with Multiple Identical Queries

emmanuelkatto24

New member
Local time
Today, 16:08
Joined
Oct 17, 2024
Messages
12
Hey everyone,

I’m Emmanuel Katto from Dubai, United Arab Emirates (UAE) experiencing some unusual performance behavior in MS Access and would love to get your thoughts or suggestions. Here’s the issue:

  • I have a table (Y) with around 30K records.
  • I’m running two identical queries in Access:
    SELECT x FROM Y WHERE x = "a"
  • When I open the first query, it loads almost instantly. But when I keep the first query open and open the second identical query, it takes 15 seconds to load, which seems unusually slow.
Additionally, I’ve noticed that if I have the first query open and then open the table Y directly, it also becomes slow, which makes me think this issue is not isolated to just the queries.

Regards
Emmanuel Katto
 
Opening things through multiple child windows incurs multiple file & record locks and requires something called "access arbitration" or "lock arbitration" even before you start to navigate. If your system default for SELECT queries is not No Locks then you will run into lock management slowdowns right away. If the thing you open is a separate back-end file across a shared network, your locking issues come into play very strongly.

There is also the issue that opening something twice causes Access to have to build a "returned records list" because now it has to treat the two child windows with parallel security requirements. You can (in theory) do something in one window and not have it show up right away in the other, because of the rules related to dynamic cursors. The second thing you open is showing you a snapshot of the first thing because that is the general rule for databases. Each path to that table or query must be treated separately. When they overlap, Access must keep snapshots of BOTH items and must resolve all locking issues when either child window navigates within the recordsets. Building the internal "result set" list takes time because it takes up space (see next paragraph).

Finally, there is the fact that these internal lists occupy virtual address space (within Access) and physical address space (within Windows) that has to be allocated - in what is called a "working set expansion" (which you can look up using that phrase). When you open up a second window or path to the records to be returned by the query, you have to allocate more space for that 2nd independent "result set" list. The mechanical side of doing that requires at least some disk involvement.

I would say that the slowdown you describe is not that unusual unless the two child windows BOTH slow down for searching or navigating once that 2nd list gets built.

And Emmanuel, you need to address the fact of having multiple EmmanuelKatto accounts - with no suffix or ending with 23 or 24. ANSWER us regarding how you want to address these accounts in the future.
 
Is the BE SQL Server or ACE?
 
I would better consider this experiencing some unusual performance behavior doing some unusual things yourself.

Why open 2 identical queries at the same time? As Doc pointed out, Access is trying to handle all the locking stuff which gets more complicated once the 2nd one is open.
 

Users who are viewing this thread

Back
Top Bottom