Microsoft Access comes with a rudimentary query analysis tool known as Jet ShowPlan.
To enable this tool, you first need to make some changes to your registry. Once that's done, Microsoft Access will start logging query plans to a file named
showplan.out. Actually finding the
showplan.out file, though, can be deceptively hard.
Read below for three techniques–in order from simplest to most reliable–that will take all the guesswork out of finding the
Check Your Documents Folder
The first place to check is in your user profile's
That's typically where the
showplan.out file is created. However, that's not always the case. Furthermore, sometimes there is a
showplan.out file there from a previous session. The current
showplan.out file could be located somewhere else.
Always check the Modified Date on the file to make sure you are looking at the right one.
Use the CurDir Function
Open Microsoft Access then go to the Immediate Window ([Ctrl] + [G]). Run the
CurDir() function to output the current working directory:
If you open the outputted path in File Explorer, you should see the
showplan.out file there.
Keep in mind that your Access application's startup code could potentially change this path. So, while it's more reliable than the first method, it's still not foolproof.
Search with Everything
I love Everything.
If you can't find
showplan.out using either of the previous methods, I guarantee this one will work for you. It has the added bonus of introducing you to the Everything utility which has been a complete game changer for my daily workflow.
- Search for
- Sort by "Date Modified" in descending order
The screenshot above is from my main development machine. As you can see, the
showplan.out file appears in 22 different locations. So, while the JetShowPlan output usually goes to my Documents folder, that's not always the case.
Still Can't Find
If you tried all three of the above techniques and you still can't find the
showplan.out file, then it means the problem is probably in the Windows Registry where you have to enable the feature in the first place.
Don't worry, though, I've got you covered there, too. You can use a different Windows utility–Process Monitor–to figure out exactly which registry entry you need to set to enable JETSHOWPLAN. I cover all of those details in my article, Using ProcMon to Troubleshoot Registry Calls.