capturing optimization level used for certain sql 
October 30th, 2008, 03:45 PM
| | | |
hello,
where can i see what optimization level a certain sql has used ?
is there any snapshot, event monitor, query patroller information
which can be used to see that ?
regards,
db2admin | 
October 31st, 2008, 03:15 PM
| | | | re: capturing optimization level used for certain sql
you can use
db2pd -db DBNAME -dynamic -full
In the section "Dynamic SQL Environments:" is the second last col the
optimization level.
Use anchorID and StmtUID to join the informations of the (three)
sections.
On Oct 30, 3:42*pm, db2admin <jag...@gmail.comwrote: Quote:
hello,
>
where can i see what optimization level a certain sql has used ?
is there any snapshot, event monitor, query patroller information
which can be used to see that ?
>
regards,
db2admin
| | 
October 31st, 2008, 07:05 PM
| | | | re: capturing optimization level used for certain sql
On Oct 31, 10:11*am, "stefan.albert" <stefan.alb...@spb.dewrote: Quote:
you can use
db2pd -db DBNAME -dynamic -full
>
In the section "Dynamic SQL Environments:" is the second last col the
optimization level.
>
Use anchorID and StmtUID to join the informations of the (three)
sections.
>
On Oct 30, 3:42*pm, db2admin <jag...@gmail.comwrote:
>> Quote:
where can i see what optimization level a certain sql has used ?
is there any snapshot, event monitor, query patroller information
which can be used to see that ?
| > | thankyou
i am wondering if all sqls get recorded in the output of this db2pd
command. i asked my developer to run some application which use some
SQLs using JDBC and after i ran this db2pd command. i was not able to
see any of the SQL used by the application my developer ran.
am i missing something ? | 
November 2nd, 2008, 10:55 PM
| | | | re: capturing optimization level used for certain sql
db2pd is an evolved snapshot command. It gives you what is there at
that time.
If the statement is gone and executed db2pd may not report on it if
it is not in the cache anymore.
If you need to catch only some statements you can read into the DB2
Info. Center about event monitors.
You can set one for stements and apply either applid or userid for
filtering. Once the event monitor is started it will catch what you
want and you can then analyze the output for your info.
Regards, Pierre.
On Oct 31, 2:00*pm, db2admin <jag...@gmail.comwrote: Quote:
On Oct 31, 10:11*am, "stefan.albert" <stefan.alb...@spb.dewrote:
>
>
> Quote:
you can use
db2pd -db DBNAME -dynamic -full
| > Quote:
In the section "Dynamic SQL Environments:" is the second last col the
optimization level.
| > Quote:
Use anchorID and StmtUID to join the informations of the (three)
sections.
| > Quote: |
On Oct 30, 3:42*pm, db2admin <jag...@gmail.comwrote:
| >> Quote: Quote:
where can i see what optimization level a certain sql has used ?
is there any snapshot, event monitor, query patroller information
which can be used to see that ?
| | >>
thankyou
i am wondering if all sqls get recorded in the output of this db2pd
command. i asked my developer to run some application which use some
SQLs using JDBC and after i ran this db2pd command. i was not able to
see any of the SQL used by the application my developer ran.
am i missing something ?
| | 
November 4th, 2008, 02:55 PM
| | | | re: capturing optimization level used for certain sql
On Nov 2, 5:51*pm, Pierre StJ <p.stjacq...@videotron.cawrote: Quote:
db2pd is an evolved snapshot command. It gives you what is there at
that time.
If the statement is gone and executed db2pd may not report on it *if
it is not in the cache anymore.
>
If you need to catch only some statements you can read into the DB2
Info. Center about event monitors.
You can set one for stements and apply either applid or userid for
filtering. Once the event monitor is started it will catch what you
want and you can then analyze the output for your info.
>
Regards, Pierre.
On Oct 31, 2:00*pm, db2admin <jag...@gmail.comwrote:
> Quote: |
On Oct 31, 10:11*am, "stefan.albert" <stefan.alb...@spb.dewrote:
| > Quote: Quote:
you can use
db2pd -db DBNAME -dynamic -full
| | > Quote: Quote:
In the section "Dynamic SQL Environments:" is the second last col the
optimization level.
| | > Quote: Quote:
Use anchorID and StmtUID to join the informations of the (three)
sections.
| | > Quote: Quote: |
On Oct 30, 3:42*pm, db2admin <jag...@gmail.comwrote:
| | >> Quote: Quote:
where can i see what optimization level a certain sql has used ?
is there any snapshot, event monitor, query patroller information
which can be used to see that ?
| | >> Quote:
thankyou
i am wondering if all sqls get recorded in the output of this db2pd
command. i asked my developer to run some application which use some
SQLs using JDBC and after i ran this db2pd command. i was not able to
see any of the SQL used by the application my developer ran.
am i missing something ?
| | thankyou Pierre,
I thought about even monitor on statement but did not try yet because
i was in doubt if this will capture optimization level information
I guess i will try and find out | 
November 5th, 2008, 12:25 PM
| | | | re: capturing optimization level used for certain sql
This information is not in the data captured with event monitor for
statement.
Also the snapshot does not give this information.
db2pd seems to be the only way... Quote:
>
I thought about even monitor on statement but did not try yet because
i was in doubt if this will capture optimization level information
I guess i will try and find out- Hide quoted text -
>
| | 
November 5th, 2008, 03:55 PM
| | | | re: capturing optimization level used for certain sql
On 5 Nov, 13:18, "stefan.albert" <stefan.alb...@spb.dewrote: Quote:
This information is not in the data captured with event monitor for
statement.
Also the snapshot does not give this information.
db2pd seems to be the only way...
>
>
> Quote:
I thought about even monitor on statement but did not try yet because
i was in doubt if this will capture optimization level information
I guess i will try and find out- Hide quoted text -
| | Which DB2 release are you using?
Another way to capture and store optimization level used by queries is
the db2 audit feature; I can ensure you that on db2 v9.5 this
information is reported.
To know how to set db2 v9.5 audit , see my post on another forum: http://www-128.ibm.com/developerwork...8701�
Regards
Salvatore Vacca | 
November 5th, 2008, 03:55 PM
| | | | re: capturing optimization level used for certain sql
On 5 Nov, 13:18, "stefan.albert" <stefan.alb...@spb.dewrote: Quote:
This information is not in the data captured with event monitor for
statement.
Also the snapshot does not give this information.
db2pd seems to be the only way...
>
>
> Quote:
I thought about even monitor on statement but did not try yet because
i was in doubt if this will capture optimization level information
I guess i will try and find out- Hide quoted text -
| |
Which DB2 release are you using?
Another way to capture and store optimization level used by queries is
the db2 audit feature; I can ensure you that on db2 v9.5 this
information is reported.
To know how to set db2 v9.5 audit , see my post on another forum: http://www-128.ibm.com/developerwork...8701�
Regards
Salvatore Vacca |  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 225,720 network members.
|