如何从Access 2010获取查询计划(showplan.out)? [英] How to get query plans (showplan.out) from Access 2010?

查看:82
本文介绍了如何从Access 2010获取查询计划(showplan.out)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图弄清楚如何在Access 2010中针对ODBC数据库表执行动态附加查询(请参见问题12592953 ),有人建议启用showplan调试输出:技术链接.但是Access 2010/accdb数据库显然不使用Jet引擎,因此这对我没有帮助.

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.

更新:这是我正在尝试使用的查询(完整的描述在上面链接的其他stackoverflow问题中).应该使用远程副本中的新行来更新表的本地副本.但是,发生的情况是Access提取了整个远程表(该表很大,导致ODBC超时),然后在本地运行WHERE.

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;

是否有与Access 2010中的Jet/Debug/showplan注册表黑客类似的东西,以获取有关Access如何查看查询的更多信息?

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

推荐答案

感谢@Fionnuala

Thanks @Fionnuala

对于Access 2010 32位,您将需要以下密钥:

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

在Windows 7 32位系统上:

On Windows 7 32 bit:

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

或在Windows 7 64位系统上:

or on Windows 7 64 bit:

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

我需要创建文件夹Debug来放入密钥.

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

这篇关于如何从Access 2010获取查询计划(showplan.out)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆