3 Ways to Find Showplan.out

Finding Jet ShowPlan's showplan.out file can be deceptively difficult. Here are three approaches to make it easy. At least one is guaranteed to work.

3 Ways to Find Showplan.out

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 showplan.out file.

Check Your Documents Folder

The first place to check is in your user profile's \Documents\ folder.  

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:

The current directory is often–but not always!–your user profile's Documents folder.

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.

  1. Search for showplan.out
  2. 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 showplan.out?

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.

Referenced articles

JetShowPlan: A Primer
You may be familiar with JetShowPlan, but I guarantee you’ve never read an article about it quite like this one.
Using ProcMon to Troubleshoot Registry Calls
Finding the correct registry keys for JetShowPlan and ODBC TraceSqlMode can be tricky. Let ProcMon take the guesswork out of the process.
Everything You Need to Find Files
Or, should I say, You Need *Everything* to Find Files.

Image by Gerd Altmann from Pixabay

All original code samples by Mike Wolfe are licensed under CC BY 4.0