on 2013 Feb 04 7:53 AM
I changed the query. Both should return the same amount of tuples. Where there were JOIN, changed to KEY JOIN (based on the concept of using the KEY JOIN). Some fields that the type CHAR that receive only numeric values have changed for the type INTEGER. (I turned off the primary and foreign keys and created again using the new fields of INTEGER). The indices were also deleted and re-created using the field of type INTEGER. The WHERE clause has not changed. Remains the same filter.
I changed the query code and grabbed the implementation plans and would like to make a comparison between them. How to correctly analyze the execution plan in ASA-9?
before: after
Please post the plan files. To save a plan, use dbisql Plan Viewer, choose 'node and detailed statistics' ( the query will be executed), generate the plan, use Save as to save the plan in a file. The plan file contains many types of statistics, beyond your pictures above, which can be used to analyze the query execution as well as the query optimization process.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Trivially, we can tell you where the differences are between the graphical representations:
But without the actual plan details ("with statistics") on each node, it's difficult to comment on why this is the case, simply by looking at the graphical representation. You need to capture the SQL statements and plan with statistics. Can these full plan files (*.xml / *.saplan) be provided?
Do both of these queries really return the same set of results? Or are they looking at different data sets? Did you change the actual SQL statement, or just the predicates for your WHERE clause?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I changed the query. Both should return the same amount of tuples. Where there were JOIN, changed to KEY JOIN (based on the concept of using the JOIN KEY). Some fields that the type CHAR that receive only numeric values have changed for the type INTEGER. (I turned off the primary and foreign keys and created again using the new fields of INTEGER). The indices were also deleted and re-created using the field of type INTEGER. The WHERE clause has not changed. Remains the same filter.
User | Count |
---|---|
66 | |
11 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.