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 > Replicated MQT - Refresh Deffered

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-12-10, 14:11
ncmdba ncmdba is offline
Registered User
 
Join Date: May 2010
Posts: 8
Replicated MQT - Refresh Deffered

Hello All,

I create a replicated MQT table on top of a base table with refresh deffered.The base table has 109 col and the MQT has 16 cols.Now from what i read in articles is that we create MQT and indexes on it.We give base table name in the queries and the db2 optimizer will decide which table to take (base table or MQT).My question here is what if i give the MQT directly in the query instead of the base table?? Will it effect the performance????

Please let me know
Thanks,
Reply With Quote
  #2 (permalink)  
Old 05-12-10, 14:38
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
You will read from the MQT. Assuming that you have the appropriate indexes and all, it should perform well.

Andy
Reply With Quote
  #3 (permalink)  
Old 05-12-10, 14:44
ncmdba ncmdba is offline
Registered User
 
Join Date: May 2010
Posts: 8
Thanks Andy...So it should work well and it keeps the db2 optimizer out of the decision making....
Reply With Quote
  #4 (permalink)  
Old 05-15-10, 21:33
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Yes, that's correct. If you query the MQT, the optimizer won't route to the base table - it only works in the opposite direction.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
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