473,473 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

db2advis with stored procedures

Hello I was wondering if I"m doing something wrong with using db2advis
I have 2 stored procedures are are massive, I created an input file to
call both of these stored procedures and I dont' seem to get any index
help, but if I put the main body of these stored procs in a view and
do a select * from that view I get a tonne of index help.

this is my input file
I have run it with the views uncommented and get great results but I
really would prefer to be able to
run db2advis against the stored procedures. I'm running v8.2 fixpak 4
===============
input.sql
call amp.getproc1(5138,0);
--select * from amp.viewproc1;
call amp.getproc2(4109);
--select * from amp.viewproc2;
===============

this is the commands I run
db2 connect to mydatabase
db2 reorgchk
cd /home/db2inst1/sqllib/misc
db2 -tvf EXPLAIN.DDL
cd /home/db2inst1
db2advis -d mydatabasre -n mydatabase -m IC -i input.sql -script
/home/db2inst1/output.txt

May 1 '06 #1
1 4128
Hi,

You should try to use Serge's DB2 profiler:
http://www-128.ibm.com/developerwork...dm-0406rielau/.
It will be a great help, as you are in 8.2+; I hope you are using SQL/PL
:-).

I have eliminated some bottlenecks at a customer site, and it was really
easy thanks to this tool. Be carefull that the event monitor used behind my
have a great impact, but when you will get the timing, you'll be able to
focus on the right code.

Hope this helps,

Jean-Marc

"mandible" <el*********@gmail.com> a écrit dans le message de
news:11**********************@j33g2000cwa.googlegr oups.com...
Hello I was wondering if I"m doing something wrong with using db2advis
I have 2 stored procedures are are massive, I created an input file to
call both of these stored procedures and I dont' seem to get any index
help, but if I put the main body of these stored procs in a view and
do a select * from that view I get a tonne of index help.

this is my input file
I have run it with the views uncommented and get great results but I
really would prefer to be able to
run db2advis against the stored procedures. I'm running v8.2 fixpak 4
===============
input.sql
call amp.getproc1(5138,0);
--select * from amp.viewproc1;
call amp.getproc2(4109);
--select * from amp.viewproc2;
===============

this is the commands I run
db2 connect to mydatabase
db2 reorgchk
cd /home/db2inst1/sqllib/misc
db2 -tvf EXPLAIN.DDL
cd /home/db2inst1
db2advis -d mydatabasre -n mydatabase -m IC -i input.sql -script
/home/db2inst1/output.txt

May 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Kent Lewandowski | last post by:
hi all, Recently I wrote some stored procedures using java jdbc code (admittedly my first stab) and then tried to implement the same within java packages (for code reuse). I encountered...
1
by: norab | last post by:
Hi, In the help here (http://publib.boulder.ibm.com/infocenter/db2help/topic/com.ibm.db2.udb.doc/admin/t0011424.htm?resultof=%22%77%6f%72%6b%6c%6f%61%64%22%20) is described that you can run the...
5
by: dotyet | last post by:
I have been given the daunting task of sql query tuning. I am looking for ways to get started with that. I am on DB2 UDB 8.2 (8.1 with Fixpak 8) on Windows. One point which I could think about...
5
by: Tim Marshall | last post by:
I was following the thread "Re: Access Treeview - Is it Safe Yet?" with interest and on reading the post describing Lauren Quantrell's SmartTree, I've run into something I don't understand: Stored...
1
by: Anurag | last post by:
Hi All, Server = DB2 ESE 8.2 on Linux, Client = DB2 Admin Client 8.2 on Windows Question = Can I execute "db2advis" from this Windows Client? Kindly see the error I receive and the setup below....
28
by: mooreit | last post by:
The purpose for my questions is accessing these technologies from applications. I develop both applications and databases. Working with Microsoft C#.NET and Microsoft SQL Server 2000 Production and...
5
by: lennart | last post by:
Here's the scenario. Take backup on production machine Restore backup on development machine OS and fixpak identical, but - and I suspect this has something to do with it - the dbadm user...
2
by: hello_db2 | last post by:
hello, db2advis gave me error like execution started at timestamp 2006-11-15-09.51.37.046473 Using the default table space name USERSPACE1 Recommending indexes... Recommending MQTs......
0
by: db2dbdba | last post by:
Hi all, I am getting the following problem when i run the db2advis. ]$ db2advis -d sample -i name3.sql -n db2inst1 -o db2advise.out 0 solutions were evaluated by the advisor exiting with...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.