If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 performance measuring problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-28-09, 06:03
MeeraJoy MeeraJoy is offline
Registered User
 
Join Date: Apr 2009
Posts: 16
Question DB2 performance measuring problem

I have two queries Q1 and Q2
Both when run on the same DB , same data give same result.

I want to check the performance of Q1 and Q2 and confirm which one of them give better performance supported by concrete measurements.

I tried db2batch command but i gives different timing which is not consistent each time query is run.


Can somebody tell me a reliable, accurate tool which will run a query and measure its performance?...so that I can compare and find if Q1 or Q2 is more efficient?
Reply With Quote
  #2 (permalink)  
Old 04-28-09, 08:18
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
First, I would use the EXPLAIN tool to look at the access paths of both queries. This will allow you to see that it is accessing what you think should be the correct indexes, etc.

Then to confirm, set up a STATEMENT Event Monitor. Start it, then run your two queries. You will need to do this a few times and change the order of running the queries as the bufferpools may mask some inefficiencies. After each run, you need to analyze the output of the event monitor.

Andy
Reply With Quote
  #3 (permalink)  
Old 04-28-09, 08:26
MeeraJoy MeeraJoy is offline
Registered User
 
Join Date: Apr 2009
Posts: 16
I am new to DB2
Can you tell me what steps are required for DB2 EXPAIN
Reply With Quote
  #4 (permalink)  
Old 04-28-09, 08:27
MeeraJoy MeeraJoy is offline
Registered User
 
Join Date: Apr 2009
Posts: 16
DB2 9.1 on Windows
Reply With Quote
  #5 (permalink)  
Old 04-28-09, 08:27
MeeraJoy MeeraJoy is offline
Registered User
 
Join Date: Apr 2009
Posts: 16
Also, something about STATEMENT event monitor
Reply With Quote
  #6 (permalink)  
Old 04-28-09, 08:28
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
What DB2 version and OS?

Andy
Reply With Quote
  #7 (permalink)  
Old 04-28-09, 08:34
MeeraJoy MeeraJoy is offline
Registered User
 
Join Date: Apr 2009
Posts: 16
DB2 9.1 on Windows
Reply With Quote
  #8 (permalink)  
Old 04-28-09, 08:44
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Please use the manuals:

Explain: DB2 Database for Linux, UNIX, and Windows

Event Monitor: DB2 Database for Linux, UNIX, and Windows

For more information, use the search feature...


Andy
Reply With Quote
  #9 (permalink)  
Old 08-18-09, 09:17
bcata bcata is offline
Registered User
 
Join Date: Oct 2008
Posts: 4
Embarcadero DBOptimizer

There is a performance monitoring tool from Embarcadero called DBOptimizer.

Form their site I found: Embarcadero DB Optimizer maximizes database and application performance by enabling DBAs and developers to quickly discover, diagnose, and optimize poor-performing SQL. DB Optimizer eliminates performance bottlenecks by identifying data intensive or frequently executed queries, focusing on specific SQL statements through query statistics (CPU, I/O, wait times), and fine-tuning problematic statements.

This is where you can find more: Database Software for SQL Optimization | DB Optimizer

Catalin
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On