简体   繁体   English

QODBC SELECT需要> 15分钟才能返回结果

[英]QODBC SELECT taking > 15 minutes to return results

I'm pretty new to using QODBC for QuickBooks reporting. 我很擅长使用QODBC进行QuickBooks报道。 One of the first SELECT queries I prepared essentially flags customers with existing unused payments in the ReceivePayment table, querying against invoices with remaining balance for that same customer. 我准备的第一个SELECT查询之一基本上在ReceivePayment表中标记客户现有未使用的付款,查询具有该同一客户剩余余额的发票。 The output is (or should be) a list of customers grouped by CustomerRefFullName, with a sum of unused payments in column #2, and sum of total balance remaining from open invoices. 输出是(或应该是)按CustomerRefFullName分组的客户列表,第2列中未使用的付款总和,以及未结发票剩余的总余额总和。

It's a fairly simple query. 这是一个相当简单的查询。 When I import the table to MS Access as a static table, the query is fast as would be expected. 当我将表作为静态表导入MS Access时,查询速度与预期的一样快。 However, when I run the query against a linked table, it takes upwards of 15 minutes to produce the results. 但是,当我针对链接表运行查询时,生成结果需要15分钟。

This should not be happening. 这不应该发生。 Is this a MS Access misconfiguration issue? 这是MS Access配置错误吗? Something else relating to QODBC configuration that I am missing or unaware of? 我还缺少或不知道与QODBC配置有关的其他事情? Any help would be appreciated. 任何帮助,将不胜感激。

I would like to inform you that when you Import QuickBooks data in the Access & run query, then obviously it will execute faster because all data available in a local MS Access table (offline). 我想告诉您,当您在Access和运行查询中导入QuickBooks数据时,显然它将执行得更快,因为本地MS Access表中可用的所有数据(离线)。 But when you execute query from linked table, QODBC is fetching data from QuickBooks. 但是当您从链接表执行查询时,QODBC正在从QuickBooks获取数据。 QODBC is an ODBC driver which uses QuickBooks SDK. QODBC是一个使用QuickBooks SDK的ODBC驱动程序。

QODBC works by accepting SQL commands from applications through the ODBC interface, then converting those calls to navigational XML commands to the QuickBooks Accounting DBMS and returning record sets that qualify for the query results. QODBC的工作原理是通过ODBC接口接受来自应用程序的SQL命令,然后将这些调用转换为导航XML命令到QuickBooks Accounting DBMS,并返回符合查询结果的记录集。 This driver is not a Client/Server product, but rather communicates directly with the QuickBooks application as it runs. 此驱动程序不是客户端/服务器产品,而是在运行时直接与QuickBooks应用程序通信。 QuickBooks is a flat file database, and this driver will not change it into a relational database, so keep that in mind when developing with this driver. QuickBooks是一个平面文件数据库,此驱动程序不会将其更改为关系数据库,因此在使用此驱动程序进行开发时请记住这一点。

QODBC acts as a 'wrapper' around the Intuit SDK so customers can finally get at their QuickBooks data using standard database tools; QODBC充当Intuit SDK的“包装器”,因此客户最终可以使用标准数据库工具获取他们的QuickBooks数据; speeding development time. 加快开发时间。

Please keep in mind that QODBC is not a database tool, but rather a translation tool. 请记住,QODBC不是数据库工具,而是翻译工具。 Every transaction you request must be translated and communicated to QuickBooks via large complicated XML transactions. 您请求的每个事务都必须通过大型复杂的XML事务进行翻译并传达给QuickBooks。

The QuickBooks application layer needs to process those XML requests. QuickBooks应用程序层需要处理这些XML请求。 The larger the number of Records, the lengthier the XML request, therefore QuickBooks may take more time and memory to process longer requests. 记录数量越大,XML请求越长,因此QuickBooks可能需要更多时间和内存来处理更长的请求。

I would suggest you to enable QODBC status panel via QODBC Setup Screen->Message Window->Select "Display Driver Status" and "Display optimizer Status" options. 我建议您通过QODBC设置屏幕 - >消息窗口 - >选择“显示驱动程序状态”和“显示优化程序状态”选项启用QODBC状态面板。

Then the next time you run a query, if you see “Waiting for QuickBooks”, it means QuickBooks is taking time to process the request. 然后,下次运行查询时,如果看到“正在等待QuickBooks”,则表示QuickBooks需要时间来处理请求。 There will be a status panel at the lower right corner of your screen, will be shown a window with information on what QODBC is working at. 屏幕右下角将显示一个状态面板,将显示一个窗口,其中包含有关QODBC正在工作的信息。 Please note the step on which QODBC spends the most time or get stuck and share it with us. 请注意QODBC花费最多时间或卡住并与我们分享的步骤。

I also suggest you to try executing below command on VB Demo and see it can resolve the issue: 我还建议您尝试在VB Demo上执行以下命令,看看它可以解决问题:

SP_OPTIMIZEFULLSYNC ALL SP_OPTIMIZEFULLSYNC全部

This command will bring some data to a local cache to increase retrieval performance for queries. 此命令将一些数据带到本地缓存,以提高查询的检索性能。 I would like to suggest you to please let run above command completely. 我想建议你完全按照命令运行。 Above command may take sometime depends on your records in QuickBooks. 以上命令可能需要一些时间取决于您在QuickBooks中的记录。 It may take 2-5 hours or more depends on the number of records in QuickBooks company file. 可能需要2-5小时或更长时间取决于QuickBooks公司文件中的记录数。 Please let this command run completely do not kill this command. 请让此命令完全运行不要终止此命令。 It is not advisable to kill/close the application while its building the Optimizer file. 不建议在构建Optimizer文件时终止/关闭应用程序。

Refer: How to execute SP_OPTIMIZEUPDATESYNC or SP_OPTIMIZEFULLSYNC for Selected Tables 请参阅: 如何为选定的表执行SP_OPTIMIZEUPDATESYNC或SP_OPTIMIZEFULLSYNC

If you are still facing issues, I kindly request you to please raise a support ticket to the QODBC Technical Support department from below mentioned link & provide requested information: 如果您仍然遇到问题,我请您通过以下链接向QODBC技术支持部门提出支持请求并提供所需信息:

http://support.qodbc.com http://support.qodbc.com

Also share more information about the issue you're facing, so that we can locate the problem quickly. 还要分享有关您所面临问题的更多信息,以便我们能够快速找到问题所在。

We may need following information, Please attach below listed files when replying to the ticket. 我们可能需要以下信息,请在回复故障单时附上以下列出的文件。

1) Screenshot of QODBC Setup Screen -- > About (Start>>All Programs>> QODBC Driver for use with QuickBooks>> QODBC Setup Screen >> About Tab ) 2) Screenshot of the issue you're facing. 1)QODBC设置屏幕截图 - >关于(开始>>所有程序>>用于QuickBooks的QODBC驱动程序>> QODBC设置屏幕>>关于选项卡)2)您遇到的问题的屏幕截图。 3) Share QuickBooks Version details: Press f2 on QuickBooks UI & share screenshot. 3)分享QuickBooks版本细节:在QuickBooks UI上按f2并分享屏幕截图。 4) Share the SQL statement you're using. 4)共享您正在使用的SQL语句。 Share Entire Log Files as an attachment in text format from 5) QODBC Setup Screen -- > Messages -- > Review QODBC Messages 6) QODBC Setup Screen -- > Messages -- > Review SDK Messages 从5)QODBC设置屏幕 - >消息 - >查看QODBC消息6)QODBC设置屏幕 - >消息 - >查看SDK消息,以文本格式分享整个日志文件作为附件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM