Previous Topic

Next Topic

Book Contents

Book Index

Rowcount for SQL Server and Sybase

We recommend that you allow AQT to manage the rowcount (see below), as there are a number of considerations for using it from within AQT.

For Sybase and SQL Server, you can use the set rowcount n statement to restrict queries to return (a maximum of) n rows. Using this clause can give significant performance benefits when dealing with large tables, however

Note for Sybase

The set rowcount will only stay in effect for the duration of your session if your ODBC Driver has been configured to use a Select Method of 1-Direct. We recommend using this setting in conjunction the the rowcount option (see next section).

Allow AQT to manage the ROWCOUNT

AQT can automatically set the rowcount for you. To enable this feature, go Options > Technical Parameters then check For Sybase and SQL Server, use SET ROWCOUNT. When this feature is enabled, AQT will periodically run a set rowcount n statement, where n is:

AQT doesn't set the rowcount every time you run a query; instead it will do that whenever the rows-to-be-displayed are changed. This will happen, for instance, when you go from running queries to using the Database Explorer. If you manually set the rowcount, it will stay into effect for a while, but will at some point be reset by AQT

Get More Rows feature

If the Get More Rows feature is used, the Rowcount will be set to 0 (no limit).

Advanced Query Tool
© 2023 Cardett Associates Ltd. All rights reserved.