FoxPro/VFP CREATE SQL VIEW 在 Windows 7 上缓慢
我在 Windows 7 64 位上使用 vfp9 时遇到问题。我发现创建 sql 视图需要 5-6 秒。这些在 XP 中会立即发生。当我的应用程序启动时,我会执行其中一些操作,因此在 Win 7 中,我的应用程序启动时间比 XP 中长 30 秒以上。我的观点是这样的:
create sql view MyView remote connection MyConn as select * from MyTable
我还发现在 Win 7 中调用 dbsetprop 会再增加 1-2 秒。在 XP 中又是瞬时的。
dbsetprop('MyView.MyPk', 'Field', 'KeyField', .T.)
dbsetprop('MyView.MyPk', 'Field', 'Updatable', .T.)
创建后,视图将按其应有的方式工作。平台上没有缓慢的情况。
有谁对我可以尝试什么有任何想法,或者有任何关于是什么/可能导致此问题的信息吗?
先感谢您。
I'm having a problem with vfp9 on Windows 7 64-bit. I've found that create sql view is taking 5-6 seconds. These happen instantaneous in XP. When my app starts up, I'm doing a few of these, so in Win 7, my app is taking 30+ seconds longer to start up than in XP. My views look like this:
create sql view MyView remote connection MyConn as select * from MyTable
I've also found that calling dbsetprop is adding another 1-2 seconds in Win 7. Again its instantaneous in XP.
dbsetprop('MyView.MyPk', 'Field', 'KeyField', .T.)
dbsetprop('MyView.MyPk', 'Field', 'Updatable', .T.)
Once created, the views work as they should. No slowness on with platform.
Does anyone have any ideas about what I could try or any info on what is/could be causing this?
Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我不知道为什么,因为我还没有使用过 Windows 7 VFP...但是,我会在 VFP 中检查并尝试更改一些设置以查看是否有帮助。
从 VFP/IDE 菜单中,转到“工具”,然后转到“选项”。在多选项卡表单上,单击“远程数据”选项卡。
我不知道它是否/试图做什么,但也许为了测试,请确保“一次获取的记录”未设置为“全部”(复选框)。
我还会研究 SQLSETPROP() 函数,看看这些设置是否有帮助。
I don't know why as I haven't worked with Windows 7 yet with VFP... However, what I would check within VFP and try changing some settings to see if it helps.
From the VFP/IDE menu, go to Tools, then Options. On the multi-tab form, click on the "Remote Data" tab.
I don't know if/what its trying to do, but maybe for testing, make sure the "Records to fetch at a time" is NOT set to "All" (checkbox).
I would also look into SQLSETPROP() function to see if any of those settings might help.
我无法在 Windows 7 64 位上重现此问题,无论是使用 VFP9 RTM 还是 VFP9 SP2。我没有任何大小的数据库可供使用,但在示例数据库 Northwind 上,您列出的命令似乎可以立即工作。
有几个问题:
I can't reproduce this on Windows 7 64 bit, either with VFP9 RTM or VFP9 SP2. I don't have a database of any size to work with but on the sample database Northwind the commands you list seem to work instantaneously.
A couple of questions:
Windows 7 和 Visual FoxPro(及类似)应用程序似乎存在更多的速度问题,我认为这归因于 Windows 7 中不同的网络堆栈、不成熟的网卡驱动程序、对布线和网络交换机问题的敏感性增加,或这些的任意组合。
确保所有 Windows 7 机器都安装在 SP1 上(以及所有具有共享 DBF 文件的 Server 2008 机器),因为这修复了影响 Visual FoxPro 索引的文件损坏问题。
确保您的网卡驱动程序是 100% 最新的。这可以产生很大的不同。
我发现网卡驱动程序可以极大地提高联网 Visual FoxPro 应用程序的速度 中断审核设置。 Intel、Broadcom 和许多其他 NIC 上都有此功能,尽管名称可能略有不同。
我个人见过这样的情况:禁用此功能后,网络 VFP 应用程序的启动时间从 30 秒缩短到大约 6 秒。
There seems to be more scope for speed problems with Windows 7 and Visual FoxPro (and similar) applications, and I think this is down to the different network stack in Windows 7, immature network card drivers, an increased susceptibility to cabling and network switch problems, or any combination of these.
Ensure that all your Windows 7 boxes are on SP1 (and any Server 2008 boxes with shared DBF files also), as this fixes a file corruption issue that affected Visual FoxPro indexes.
Ensure that your network card drivers are 100% up to date. This can make a big difference.
One thing that I have seen which can give a massive improvement to the speed of networked Visual FoxPro applications is the network card driver Interrupt Moderation setting. This is present on Intel, Broadcom and many other NICs, although with possibly slightly different names.
I have personally seen situations where disabling this has changed a networked VFP application from taking 30 seconds to start to about 6 seconds.
找到了解决方案。
机器附带的 raid 控制器软件在驱动器上禁用了写入缓存。
在“设备管理器”>“设备管理器”下启用了写入缓存磁盘驱动器>属性>政策。但是该软件会覆盖此设置。
通过在 Windows 7 策略中取消选中它,可以在没有 raid 软件的情况下重现它。
Found the solution.
Write caching was being disabled on the drive by the raid controller software included with the machine.
Write caching was enabled under Device Manager > Disk Drive > Properties > Polices. However the software was overriding this setting.
It can be reproduced without the raid software by unchecking it in Windows 7 Polices.