Replaces the current cost model with the cost model stored in the specified file.
sa_load_cost_model ( file_name )
file_name Use this CHAR(1024) parameter to specify the name of the cost model file to load.
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_load_cost_model system procedure allows you to load a cost model that has been saved to file (file_name). Loading a cost model replaces the current cost model for the database.
The sa_unload_cost_model system procedure does not include CALIBRATE PARALLEL READ information in the file that sa_load_cost_model loads.
Using the sa_load_cost_model system procedure can eliminate repetitive, time-consuming recalibration activities when there is a large number of identical hardware installations.
Exclusive use of the database is required when loading the new cost model.
When loading a cost model, consider whether it was generated for a database that is located on similar hardware. Loading a cost model from a database that is stored on significantly different hardware may cause poor performance due to inefficient access plans.
Cost models are saved to file using the sa_unload_cost_model system procedure. See sa_unload_cost_model system procedure.
Must have DBA authority.
The database server performs a COMMIT after loading the new cost model.
The following example loads the cost model from a file called costmodel8:
CALL sa_load_cost_model( costmodel8 );
|Send feedback about this page via email or DocCommentXchange||Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0|