Article ID: 168686
Article Last Modified on 12/8/2003
APPLIES TO
- Microsoft Visual C++ 4.2 Enterprise Edition
- Microsoft Visual C++ 5.0 Enterprise Edition
- Microsoft Visual C++ 5.0 Professional Edition
- Microsoft Windows NT Server 3.5
- Microsoft Windows NT Server 3.51
- Microsoft Windows NT Server 4.0 Standard Edition
- Microsoft Windows NT 4.0 Service Pack 4
- Microsoft Windows NT Workstation 3.5
- Microsoft Windows NT Workstation 3.51
- Microsoft Windows NT Workstation 4.0 Developer Edition
- Microsoft Windows NT Workstation 4.0 Developer Edition
- Microsoft Data Access Components 2.5
This article was previously published under Q168686
SYMPTOMS
A Microsoft Visual C++ database project that uses the Microsoft Access 97
(Jet 3.5) ODBC Driver has a noticeable drop in performance compared to
similar projects that use the Microsoft Access 95 (Jet 3.0) ODBC Driver.
CAUSE
The Microsoft Access 97 ODBC driver correctly reads and uses the
MaxBufferSize performance setting in the ODBC data source. For applications
that deal with large amounts of database activity, the default
MaxBufferSize setting of 512K may be too small and result in a performance
loss. The default MaxBufferSize setting of 512 was designed for optimal
performance when using Jet databases under normal conditions but will
restrict the amount of memory allotted to the driver and impact performance
when using the driver more aggressively.
RESOLUTION
Increase the MaxBufferSize setting to reduce the amount of swapping that is
caused by the more restrictive high watermark of 512K. The MaxBufferSize
setting can be pre-set in the ODBC datasource or set programmatically
starting in Visual C++ version 5.0 using the SetOption method documented in
the DAO SDK. Increasing the MaxBufferSize setting greatly improves
performance when the database activity level is high by preventing frequent
page swapping. Setting MaxBufferSize to 0 activates Jet's built-in
mechanism to determine the high watermark. Please look at the MORE
INFORMATION section below for details.
STATUS
This behavior is by design.
REFERENCES
For additional information on Jet performance settings such as
MaxBufferSize, see Chapter 13 of the Microsoft Jet Database Engine
Programmer's Guide (Microsoft Press).
For information on setting the MaxBufferSize setting programmatically,
search for the "SetOption Method" in the DAO SDK online help in Visual
Studio 97.
Keywords: kbprogramming kbprb KB168686