VFPODBC 非常慢

发布于 2024-08-24 04:56:21 字数 1621 浏览 3 评论 0原文

我正在使用 MS Access 2003 前端通过 odbc 访问 Visual Foxpro 9 应用程序拥有的网络驱动器上的数据,速度似乎慢得令人难以置信 - 一个特定的表中有大约 1400 条记录,并且需要很长时间才能访问。尽管在使用基本的 DBF 查看器或表所属的应用程序时,加载速度是瞬时的,但在 Access 界面上加载只需一分钟。查询数据时,比打开整个表视图要快,但仍然比我预期的慢很多;它访问的计算机位于同一网络上,目前通过应用程序进行访问的速度比 Web 托管的 SQLServer 慢,而 Web 托管的 SQLServer 上的记录数量轻松是该数量的 10 倍。

任何关于我可以尝试使用 VFP ODBC 链接来加速但不明显的事情的建议将不胜感激。

编辑

谢谢戴夫,目前,我只是在玩一个查询,试图让它在 Access 的查询选项卡中工作...

目前的查询需要大约 4 分钟才能运行..它返回一个包含 10 行信息的交叉表,基于大约 230 条记录的输入条件 - 我已经在没有组表中的联接和字段的情况下尝试过,但速度差异可以忽略不计。

只是从一些角度来看:

Allsales 包含大约 50 个字段和 15,000 条记录 Stock包含约100个字段和500条记录 组包含 3 个字段和 8 个记录。

SELECT allsales.type, allsales.branch, allsales.terminal, allsales.date, Sum(allsales.totalprice) AS SumOftotalprice, Sum(allsales.discamount) AS SumOfdiscamount, Sum(allsales.tender1) AS SumOftender1, Sum(allsales.tender2) AS SumOftender2, Sum(allsales.tender3) AS SumOftender3, Sum(allsales.tender4) AS SumOftender4, Sum(allsales.tender5) AS SumOftender5, Sum(allsales.tender6) AS SumOftender6, Sum(allsales.tender7) AS SumOftender7, Sum(allsales.tender8) AS SumOftender8, Sum(allsales.tender9) AS SumOftender9, Sum(allsales.tender10) AS SumOftender10, Sum(allsales.tender11) AS SumOftender11, Sum(allsales.tender12) AS SumOftender12, Sum(allsales.loypoints) AS SumOfloypoints, Count(allsales.type) AS Fuzz, groups.desc
FROM (stock RIGHT JOIN allsales ON stock.plu = allsales.plu) LEFT JOIN groups ON stock.cgroupid = groups.id
GROUP BY allsales.type, allsales.branch, allsales.terminal, allsales.date, groups.desc, allsales.reportdate
HAVING (((allsales.reportdate)=#3/1/2010#));

I'm using an MS Access 2003 front end to access the data on a network drive owned by a Visual Foxpro 9 application via odbc, and it seems to be unbelievably slow - there's about 1400 records in one particular table, and it takes a good minute to load up on the Access interface, although when using a basic DBF viewer, or the application that the tables belong to, it's instantaneous. When querying the data, it's quicker than opening the whole table view, but still much slower than I'd expect; the machine it's accessing is on the same network, and it's currently slower to access through the application than a web-hosted SQLServer with easily 10 times that number of records on it.

Any suggestions as to things that I can try with the VFP ODBC link to speed it up that aren't obvious would be appreciated.

EDIT

Thanks Dave, At present, I'm just playing with a query trying to get it working within Access' query tab...

Query as it stands is taking about 4 minutes to run.. It returns a crosstab containing 10 rows of information, based on input criteria of approximately 230 records - I've tried it without the joins and fields from the Group table, but the speed difference is negligible.

Just to put some perspective on it:

Allsales contains about 50 fields and 15,000 records
Stock contains about 100 fields and 500 records
Groups contains 3 fields and 8 records.

SELECT allsales.type, allsales.branch, allsales.terminal, allsales.date, Sum(allsales.totalprice) AS SumOftotalprice, Sum(allsales.discamount) AS SumOfdiscamount, Sum(allsales.tender1) AS SumOftender1, Sum(allsales.tender2) AS SumOftender2, Sum(allsales.tender3) AS SumOftender3, Sum(allsales.tender4) AS SumOftender4, Sum(allsales.tender5) AS SumOftender5, Sum(allsales.tender6) AS SumOftender6, Sum(allsales.tender7) AS SumOftender7, Sum(allsales.tender8) AS SumOftender8, Sum(allsales.tender9) AS SumOftender9, Sum(allsales.tender10) AS SumOftender10, Sum(allsales.tender11) AS SumOftender11, Sum(allsales.tender12) AS SumOftender12, Sum(allsales.loypoints) AS SumOfloypoints, Count(allsales.type) AS Fuzz, groups.desc
FROM (stock RIGHT JOIN allsales ON stock.plu = allsales.plu) LEFT JOIN groups ON stock.cgroupid = groups.id
GROUP BY allsales.type, allsales.branch, allsales.terminal, allsales.date, groups.desc, allsales.reportdate
HAVING (((allsales.reportdate)=#3/1/2010#));

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

风吹雨成花 2024-08-31 04:56:21

关闭 ODBC 驱动程序配置中的日志记录。

Turn off logging in ODBC driver configuration.

吐个泡泡 2024-08-31 04:56:21

您可以尝试使用 FoxPro OLEDB 驱动程序,看看是否有任何区别。听起来 Access 应用程序以及从 FoxPro 检索数据后如何处理数据可能存在一些问题。我制作了很多使用 FoxPro 作为数据存储的 ASP/ASP.NET 页面,并且没有遇到您所描述的问题。您确定是 VFP ODBC 数据传输运行速度较慢吗?也许发布数据访问代码可以提供线索?

You could try the FoxPro OLEDB driver to see if it makes any difference. Sounds like there may be some issues with the Access application and how if processes the data once it is retrieved from FoxPro. I have made lots of ASP/ASP.NET pages that use FoxPro as the data store and not had a problem such as you describe. Are you sure it is the VFP ODBC data transfer that is running slower? Perhaps posting the data access code could yield a clue?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文