number of aux scan descriptors sets the number of auxiliary scan descriptors available in a pool shared by all users on a server.
Summary Information |
|
---|---|
Default value |
200 |
Range of values |
0–2147483647 |
Status |
Dynamic |
Display level |
Comprehensive |
Required role |
System administrator |
Configuration groups |
Memory Use, SQL Server Administration |
All tables referenced in the from clause of the query
All tables referenced in a view named in the query (the view itself is not counted)
All tables referenced in a subquery
All tables that need to be checked for referential integrity (these are used only for inserts, updates, and deletes)
A table created with select...into
All worktables created for the query
If a table is referenced more than once (for example, in a self-join, in more than one view, or in more than one subquery) the table is counted each time. If the query includes a union, each select statement in the union query is a separate scan. If a query runs in parallel, the coordinating process and each worker process needs a scan descriptor for each table reference.
When the number of user tables referenced by a query scan exceeds 16, or the number of worktables exceeds 12, scan descriptors from the shared pool are allocated. Data-only-locked tables also require a system table descriptor for each data-only-locked table accessed with a table scan (but not those accessed with an index scan). If more than 16 data-only-locked tables are scanned using table scans in a query, auxiliary scan descriptors are allocated for them.
If a scan needs auxiliary scan descriptors after it has used its allotted number, and there are no descriptors available in the shared pool, SAP ASE displays an error message and rolls back the user transaction.
If none of your queries need additional scan descriptors, you may still want to leave number of aux scan descriptors set to the default value in case your system requirements grow. Set it to 0 only if you are sure that users on your system will never run queries on more than 16 tables and that your tables will always have few or no referential integrity constraints.
Rewrite the query, or break it into steps using temporary tables. For data-only-locked tables, consider adding indexes if there are many table scans.
Redesign the table’s schema so that it uses fewer scan descriptors, if it uses a large number of referential integrity constraints. You can find how many scan descriptors a query would use by enabling set showplan, noexec on before running the query.
Increase the number of aux scan descriptors setting.
The following sections describe how to use sp_monitorconfig to monitor the current and high-water-mark usage to avoid running out of descriptors, and how to estimate the number of scan descriptors you need.