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 > MQT Refresh painfully slow

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-10-10, 03:21
diwakarmdba diwakarmdba is offline
Registered User
 
Join Date: Apr 2010
Posts: 8
MQT Refresh painfully slow

I have a MQT which reads data from three tables. The problem is refresh is terribly slow. Note that I have ensured indexes on all the base tables with their statistics updated.

Can anything be done to expedite the refresh?

Thanks in advance
Reply With Quote
  #2 (permalink)  
Old 12-10-10, 09:09
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
You can take the query SQL of the MQT definition and explain it. Maybe that will help.

Andy
Reply With Quote
  #3 (permalink)  
Old 12-10-10, 09:13
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by diwakarmdba View Post
refresh is terribly slow.
Is that a new measurement unit? And why is that a problem?
Reply With Quote
  #4 (permalink)  
Old 12-10-10, 17:07
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
You can try temporary disabling logging during refresh table, check this technote for more info:
IBM - How to temporarily turn logging off for operations modifying the table?

But if some error occurs during the not logged operation, the MQT will be marked as inaccessible.
Reply With Quote
  #5 (permalink)  
Old 12-11-10, 07:04
diwakarmdba diwakarmdba is offline
Registered User
 
Join Date: Apr 2010
Posts: 8
Thumbs down bactiffi consular

I did an explain on the MQT and it had a paltry cost of 714 timerons but actually if I run the query using db2batch it takes a whopping 723 seconds.

I did try db2advis on the query within the MQT but it did not recommend any indexes as the existing indexes would suffice.

I checked if any of the base tables needed reorganization but it was not the case.

Any inputs on the top of what I have done thus far would be appreciated. Thanks
Reply With Quote
  #6 (permalink)  
Old 12-13-10, 10:49
dav1mo dav1mo is offline
Registered User
 
Join Date: Dec 2007
Location: Richmond, VA
Posts: 782
You could post the SQL for suggestions on how to write it differently. We might be able to help out with something there, but your refresh is going to be as slow or as fast as the query that is being executed can return the rows.
Dave
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