Last modified: March 09, 2015
Applies to: Windows | Windows Server
The JetSetTableSequential function notifies the database engine that the application is scanning the entire current index that contains a given cursor. Consequently, the methods that are used to access the index data will be tuned to make this scenario as fast as possible.
Windows XP: JetSetTableSequential is introduced in Windows XP.
JET_ERR JET_API JetSetTableSequential( __in JET_SESID sesid, __in JET_TABLEID tableid, __in JET_GRBIT grbit );
The session to use for this call.
The cursor to use for this call.
A group of bits that specify zero or more of the following options.
This option is used to index in the forward direction.
Windows 7: JET_bitPrereadForward is introduced in Windows 7.
This option is used to index in the backward direction.
Windows 7: JET_bitPrereadBackward is introduced in Windows 7.
This function returns the JET_ERR datatype with one of the following return codes. For more information about the possible ESE errors, see Extensible Storage Engine Errors and Error Handling Parameters.
The operation cannot complete because all activity on the instance that is associated with the session has been quiesced as a result of a call to JetStopService.
The operation cannot complete because the instance that is associated with the session encountered a fatal error that requires that access to all data be revoked to protect the integrity of that data.
Windows XP: This return value is introduced in Windows XP.
The operation cannot complete because the instance that is associated with the session has not yet been initialized.
The operation cannot complete because a restore operation is in progress on the instance that is associated with the session.
The operation cannot complete because the instance that is associated with the session is being shut down.
If this function succeeds, the current index of the cursor is optimized for a sequential scan of the entire index. No change to the database state will occur.
If this function fails, no change to the configuration of the cursor will occur. No change to the database state will occur.
If the application needs to efficiently scan a known subset of an index, a similar optimization is also performed whenever an index range is established by using JetSetIndexRange. This optimization is only available on Windows XP and later releases.
If the application needs to efficiently scan an unknown subset of an index, no action should be taken. The engine can automatically detect scanning behavior and will fetch data ahead of time. This behavior is not as aggressive, however.
This optimization will make scanning the primary index efficient and will make scanning just the index entry data in a secondary index efficient. It will not make scanning a secondary index while retrieving record data efficient. This is because the engine does not perform a read-ahead on the record data.
Requires Windows Vista or Windows XP.
Requires Windows Server 2008 or Windows Server 2003.
Declared in Esent.h.