Results 1 to 3 of 3

Thread: SQLs in DB

  1. #1
    Join Date
    Dec 2008

    Unanswered: SQLs in DB

    env: DB2 v9.5 FP4 - AIX

    1. I would like to get all the SQLs executed against my database. Is my equation correct:
    All the SQLs in a database = Dynamic SQLs (from snapshot views) + Static sqls (from stored proc/functions/packages)

    2. I would like to get Dynamic SQLs with executing user ID, how to get the executing user ID?


  2. #2
    Join Date
    Dec 2007
    Richmond, VA
    Provided Answers: 5
    What is the object of this exercise? I have worked in systems where you would be talking a several hundred thousand SQL statements. Not sure what good having each of them would have done me as I am not interested in probably >90% of them. Wouldn't it be better to explain all of the SQL being executed against your database, then mine the explain tables for poor access paths, the dsn_predicat_table for items that might hamper performance? Or what about snapshots for getting the top running/consuming SQL?

  3. #3
    Join Date
    Dec 2008
    Performance tuning, auditing (with out audit turned on), to eliminate index by grouping queries by table (apart from using db2pd ixscan).

    I have few tables with 15+ indexes, each table with 100 million+ rows (30+ columns), so, I am trying to get all the sqls against these tables & have second look at index design.

    I need to associate the SQLs with user id, because, user id is the schema for tables & I have two different schema with same table names (ID1.Table1 & ID2.Table1)

    I inherited this system, and I can't change application at this point or make architectural recommendation.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts