Unloads the current cost model to the specified file.
sa_unload_cost_model ( file_name )
file_name Use this CHAR(256) parameter to specify the name of the file in which to unload the data. Because it is the database server that executes the system procedure, file_name specifies a file on the database server computer, and a relative file_name specifies a file relative to the database server's starting directory.
The optimizer uses cost models to determine optimal access plans for queries. The database server maintains a cost model for each database. The cost model for a database can be recalibrated at any time using the CALIBRATE SERVER clause of the ALTER DATABASE statement. For example, you might decide to recalibrate the cost model if you move the database onto non-standard hardware.
The sa_unload_cost_model system procedure allows you save a cost model to an ASCII file (file_name). You can then log into another database and use the sa_load_cost_model system procedure to load the cost model from the first database into the second one. This avoids having to recalibrate the second database.
The sa_unload_cost_model system procedure does not include CALIBRATE PARALLEL READ information in the file.
Using the sa_unload_cost_model system procedure eliminates repetitive, time-consuming recalibration activities when there is a large number of similar hardware installations.
DBA authority required
You must have write permissions where the file is created.
None
The following example unloads the cost model to a file called costmodel8:
CALL sa_unload_cost_model( 'costmodel8' ); |
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |