Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get query plans (showplan.out) from Access 2010?

I'm trying to figure out how to execute a dynamic append query in Access 2010 against an ODBC database table (see question 12592953) and someone suggested enabling the showplan debugging output: techrepublic link. But Access 2010 / accdb databases apparently don't use the Jet engine, so this doesn't help me.

Update: This is the query I'm trying to get working (a full description is in the other stackoverflow question linked above). It is supposed to update the local copy of a table with the new rows from the remote copy. But what happens is Access pulls the entire remote table (which is huge and causes ODBC to timeout), then runs the WHERE locally.

INSERT INTO local (dt, latitude, longitude)
SELECT dt, latitude, longitude
FROM remote_odbc, (SELECT max(dt) AS max_dt FROM local) AS sub
WHERE remote_odbc.dt > max_dt;

Is there something similar to the Jet / Debug / showplan registry hack in Access 2010 for getting more information about how Access views a query?

like image 284
cswingle Avatar asked Sep 26 '12 17:09

cswingle


People also ask

How do I get data out of access?

To export data from Access, first select the table or other database object to export in the Navigation Pane. Then click the “External Data” tab in the Ribbon. Then click the button in the “Export” button group for the file format to which to export the object.

How do I view a query in Access 2010?

To see the query results, on the Design tab, click Run. Access displays the results of your query in Datasheet view. To make further changes to the query, click Home > View > Design View to switch back to Design view.

How do I save a query design in access?

Saving a Query in Access To save your query in Access, click the “Save” button in the Quick Access toolbar. Then type a name for your query into the dialog box which appears. Then click the “OK” button. You can then close the query without losing your query design work.


2 Answers

Thanks @Fionnuala

For Access 2010 32 bit You will need the following key:

On Windows 7 32 bit:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Access Connectivity Engine\Engines\Debug]
"JETSHOWPLAN"="ON"

or on Windows 7 64 bit:

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\Access Connectivity Engine\Engines\Debug]
"JETSHOWPLAN"="ON"

I needed to create the folder Debug to put the key in.

like image 107
Jacob Avatar answered Dec 22 '22 22:12

Jacob


You will need the following key:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Access Connectivity Engine\Engines\Debug]
"JETSHOWPLAN"="ON"

The above is exported from my Windows 7 registry running Access 2010, and produces showplan.out for me.

like image 23
Fionnuala Avatar answered Dec 22 '22 21:12

Fionnuala