(originally published at www.sybase.com in June 2009; moved to SCN in December 2012)
When version 15.0.3 ESD#1 of ASE was released in March 2009, migrating to ASE 15 instantly became easier. This is due to a new feature named “Compatibility Mode” that was part of this ASE release.
Compatibility Mode is an optimizer-related feature, and as the name suggests, it provides compatibility — to be specific, with the behaviour of the optimizer in ASE 12.5. This means that, with Compatibility Mode enabled, queries will be optimized according to the optimizer logic as in ASE 12.5, and get query plans that are identical or at least very similar to those in 12.5. At the same time, all ASE 15-specific optimizer features and enhancements, such as optimization goals and hash joins, do not apply and will not be used.
So what does Compatibility Mode mean, and why was it added to ASE?
At first sight, providing a feature that stops queries from benefiting from ASE 15’s query processing enhancements sounds like a step backwards. That would, however, be the wrong conclusion, and there is in fact a deeper logic here: Compatibility Mode is being made available as an additional tool to ease migration to ASE 15.
The story goes as follows. When migrating from ASE 12.x to ASE 15, you should plan to test your applications thoroughly prior to switching your production systems to ASE 15. This is because of the new, fully rewritten query processing engine in ASE 15: while the majority of queries will run faster than, or the same as, in 12.x, there could potentially be some boundary cases where a slower query plan is generated. Those cases are usually easy to repair, but testing should ensure you find these cases in time.
Now, the issue is that a number of customers have recognized they cannot currently line up sufficient resources for this testing, for varying reasons (like the current economic situation). However, they’d still like to migrate to ASE 15, for example because of the upcoming end-of-life for 12.5 support. This is where Compatibility Mode comes in: by not using the new ASE 15 query processing engine, but using the 12.5 logic instead, the chance that queries will perform worse than in 12.5, is minimal, since the query plans will be the same as in 12.5. Consequently, the amount of testing that will need to be done when migrating to ASE 15 will be less than when migrating without Compatibility Mode.
So what does Compatibility Mode mean for you?
Well, instead of having to test all your applications intensively when going to ASE 15, you can now migrate relatively easily by enabling Compatibility Mode; at your leisure, you can then choose which applications or queries stand the best chance of benefiting from ASE 15’s new query processing features. For those, you can then turn Compatibility Mode off (for example, in a login trigger) and perform the required testing to ensure things run fine when using ASE 15’s query processing engine.
So the essence of Compatibility Mode really is that you now have a choice of where to focus your testing efforts for ASE 15 migration: instead of being forced to test everything at the moment of migration, you can just pick those areas where you expect the biggest returns from ASE 15 — and you can do this after having migrated, without feeling the pressure of being ready before the end-of-life for 12.5 support. That should make migration a little easier.
There’s much more to say about the details of Compatibility Mode than fits in this space. For that reason, a whitepaper has been written about this topic. I recommend you pick it up from http://www.sybase.com/detail?id=1063556 .