5 SQL tuning Strategies - DB2

Tuning Strategies:   Ø       Tuning Strategy 1: ü       Adjust the COLCARD, FIRSTKEYCARD and FULLKEYCARD columns to an artificially high value. Reason: ü&nbs

Tuning of SQL queries in DB2 when RUNSTAT is not feasible

Updating the DB2 Catalog Statistics: Ø       This method of tuning is chosen whenever standard methods (RUNSTATS) of influencing the DB2’s access path selection are not satisfactory.  Ø 

Function of OPTIMIZE FOR n ROWS in DB2

OPTIMIZE FOR n ROWS:  Ã˜       This method enables the programmers to specify the estimated maximum number of rows that will be retrieved. Ø       It provides more i

Tweaking of SQL queries in DB2 - Use of Filter factor

Tweaking the SQL statements:  Ã˜       Tweaking is the process of changing a SQL statement without changing its functionality Ø       Filter Factor is a ratio that DB2

DB2 Access path Determination - Function of DB2 Optimiser

Function of DB2 Optimizer:  Ã˜       The Optimizer is the method by which DB2 chooses to carry out the data manipulation requested in the SQL statements Ø       DB2 Opt

Tuning and optimisation of SQL in DB2 - Tips and Tricks

Most SQL queries are written with little importance to performance tuning. Often, this is not a problem when programs are tested in test environment, where performance is not an issue. But, production environments calls for lesser execution