This is a general question. While the documentation provides us with a number of possible options for calibration, it is not quite clear to me when the calibration should be used and which calibration type should be chosen at what circumstances. The rationale for the calibration is quite clear and the concept of calibration is not unique to SQL Anywhere. The question is how to use it properly.

Just for example, would it be considered a good practice to calibrate every database? What are pros and cons? Also, is there any way to see the calibration statistics in a readable way, better than provided by sa_unload_cost_model? Is it possible to see how calibration affects optimizer's calculations? I'm looking for something better than just comparing query plans before and after the calibration.

Please share your experience with calibration in SQLA.

asked 06 Mar '12, 07:57

Leonid%20Gvirtz's gravatar image

Leonid Gvirtz
2964815
accept rate: 0%


For the reader, here is the link to the ALTER DATABASE CALIBRATE page in the documentation.

Generally if you are running on a typical computer with your database on a single spindle disk then you likely won't need to calibrate your database since the out-of-box settings are good enough for this case. However if you are using an SSD or a RAID configuration for your database and/or dbspace(s) then running calibrate on the database could help improve the query plans chosen by the optimizer.

You only need to run calibrate once per database/configuration since the calibration only determines the relative speed of your I/O subsystem where your database (and/or dbspace(s)) reside. If you move your database to a new computer or disk system then running calibration again would be a good idea.

Regarding tools to see the affect of the calibration, this would be very difficult to construct since the effect could be very subtle and will depend on your workload. Your suggested method of looking at the before and after plans for your workload queries is the best method.

I do not know of any tools for looking at the calibration statistics. You could look at the results in the system tables?

permanent link

answered 06 Mar '12, 08:50

Mark%20Culp's gravatar image

Mark Culp
24.9k10141297
accept rate: 41%

Thanks for quick answer. You mentioned that it is possible to see calibration statistics in system tables. What tables should I look in?

By a "tool" for check the effect of the calibration I meant something like "set option show_lio_consting" in ASE 15 or trace flags 302 and 310 in previous ASE versions. Are there any plans to introduce such a functionality in SQLA?

(06 Mar '12, 10:36) Leonid Gvirtz
Replies hidden
1

The table is sys.sysoptstat but I see that the calibration data is a long binary and therefore isn't much use to a human reader. :-(

(06 Mar '12, 18:46) Mark Culp
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×28
×6

question asked: 06 Mar '12, 07:57

question was seen: 3,443 times

last updated: 06 Mar '12, 18:46