Personal tools
You are here: Home DB2 DB2 UDB v9 Monitoring performance with SQL - Costly table scans
Navigation
Log in


Forgot your password?
 
Document Actions

Monitoring performance with SQL - Costly table scans


Shows Percentage of rows SELECTED compared to number of rows READ from tables

db2 "select substr(authid,1,10) as authid, substr(appl_name,1,20) as appl_name 
,percent_rows_selected from sysibmadm.appl_performance"


AUTHID          APPL_NAME   PERCENT_ROWS_SELECTED
-------------     ---------------     ---------------------------------
INST461            db2batch                                     50.24
INST461                db2bp                                            -
INST461           db2taskd                                       0.00
INST461           db2stmm                                            -
INST461               db2bp                                        2.39

High rows read to rows selected ratio indicates table scans

The APPL_PERFORMANCE administrative view displays information about the
percentage of rows selected by an application. The information returned
is for all database partitions for the currently connected database.
This view can be used to look for applications that might be performing
large table scans or to look for potentially troublesome queries.

If the selectivity is low, then the application may be performing a table
scan (perhaps unnecessarily if an index were available). Use this query
to look for potentially troublesome queries and then dig deeper by
looking at the SQL being executed to see if there are issues that can be
resolved.

Security Awareness
Would you like your company to implement gamification into your security awareness program?





Polls