本文介绍了虚拟主键=慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我在这里讨论的是一个SQL 7视图,当链接到 和Access 2000 MDB时,它会慢慢滚动。在尝试了各种各样的事情之后,我把它提炼到了以下:以下:当链接视图有虚拟主键时,它很慢; 没有时虚拟主键,它快速滚动。 看看Profiler,我看到当没有虚拟主键时,Access 发送一个简单的select命令SQL Server。但是,当有一个 虚拟主键时,Access会获取一个主键值列表,然后使用这些值来从SQL Server以10个为一组获取记录。 这可能解释了当存在虚拟 主键时滚动速度慢的原因。但是,我想知道是否有任何方法可以提高性能或 否则可以解决这个明显的瓶颈问题。 MS文献说创建虚拟主键不会影响 的表现。但是,由于在使用和不使用虚拟主键的情况下使用不同的获取数据的方法是 ,它似乎确实影响了b / b $ b的性能,当然也适用于这种情况。 br /> 谢谢, Neil I''ve been discussing here a SQL 7 view which scrolls slowly when linked toan Access 2000 MDB. After trying various things, I''ve distilled it down tothe following: when the linked view has a virtual primary key, it is slow;when there is no virtual primary key, it scrolls quickly. Looking at Profiler, I see that when there is no virtual primary key, Accesssends a simple select command to SQL Server. However, when there is avirtual primary key, Access gets a list of primary key values, and then usesthose values to get records from SQL Server in groups of 10. This may account for why the scrolling is slow when there is a virtualprimary key. However, I wonder if there''s any way to improve performance orotherwise work around this apparent bottleneck. The MS literature says that creating a virtual primary key will not affectperformance. However, since different methodologies for obtaining data areused with and without the virtual primary key, it seems that it does affectperformance, and certainly does in this situation. Thanks, Neil 推荐答案 这篇关于虚拟主键=慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
11-03 02:52