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 > Query Tuning

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-11-12, 02:18
alwayssathya alwayssathya is offline
Registered User
 
Join Date: Aug 2010
Location: Chennai India
Posts: 161
Red face Query Tuning

Hi i am in the learning phase of query tuning, I have this query executed in our prod, which does more sorting.. Just want to understand how this can be tuned to give better performance.

SELECT SUM(consumption), SUM(demand), MIN(start_dts_lt), MAX(end_dts_lt), MIN(start_dts_z), MAX(end_dts_z) FROM GEMS.METER_CON
S_SUM_1H WHERE ruletimestamp= '2012-01-11 06:31:02.674050' AND HOUR(start_dts_lt)=17 AND DATE(start_dts_lt)='2012-01-10' AND o
rgname='WPL' AND location='EC4' AND meterid IN (SELECT assetuid FROM GEMS.MAXIMO_ASSETMETER_SVC_CONS_SUM_DAY WHERE parentuid L
IKE 'C_WPLxL_EC4xMA_OFA02xEC_11' AND type='CALCULATED')

there are many such query i want to have a basic understanding hw to approach on these kind of query.

pl. suggest any free tools for the same.
Reply With Quote
  #2 (permalink)  
Old 01-11-12, 02:50
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
have you looked at the access plan with db2 explain tool
try db2advis to see what is recommended
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
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