| |
|
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.
|
 |

01-16-09, 12:16
|
|
Registered User
|
|
Join Date: Jul 2002
Location: ATL
Posts: 170
|
|
|
RUNSTATS does not Work for MQT UDB EEE V9
|
|
Hello guys
Iam running into a bizzare issue. Runstats is not updating the system catalog tables with accurate row count of MQT. The card is way off and this is resulting poor performance for the queries. My MQT has 100k rows and card shows 6k
db2_all "db2 connect to testdb;db2 runstats on table test_table with distribution and indexes all"
UDB DPF V9 fixpack4 on AIX 5.3 (64 bit)
Any one ran into this bizzare issue!!!!. I have a ticket open with IBM
|
|

01-16-09, 13:07
|
|
:-)
|
|
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
|
|
You realize, of course, that in a partitioned database statistics are collected for one partition only. If your MQT is distributed across 10 partitions, CARD will show approximately 1/10th of the actual number of rows in the table.
|
|

01-16-09, 13:33
|
|
Registered User
|
|
Join Date: Jul 2002
Location: ATL
Posts: 170
|
|
|
|
Nick Does it mean DB2 maintains system catalogs on each of the nodes ?
|
|

01-16-09, 14:12
|
|
:-)
|
|
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
|
|
Quote:
|
Originally Posted by koganti
Nick Does it mean DB2 maintains system catalogs on each of the nodes ?
|
No, it does not. The system catalog exists only on the curiously named catalog node.
|
|

01-19-09, 03:39
|
|
Registered User
|
|
Join Date: Oct 2004
Location: DELHI INDIA
Posts: 336
|
|
I checked the same in my DB for the MQTs and the system catalogs showing correct number of records. Moreover if your table is in "n" different partitions ideally the system catalog shows you the total row count of the tables irrespective of the number of partitions.
__________________
Jayanta Datta
DB2 UDB DBA
IBM India, Global Delivery
New Delhi
|
|

01-19-09, 03:48
|
|
Registered User
|
|
Join Date: May 2003
Location: USA
Posts: 5,196
|
|
The title of this thread is somewhat curious in that:
1. Starting with DB2 V9, the name UDB has been dropped. It is now DB2 9 for Linux/UNIX/Windows.
2. EEE hasn't existed since V7, was replaced in V8 by DPF feature added to ESE, and replaced in V9.5 by Data Warehouse Edition (although OP is on 9.1 and it is still called DPF feature).
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
|
|

01-19-09, 15:10
|
|
Registered User
|
|
Join Date: Jul 2002
Location: ATL
Posts: 170
|
|
Quote:
|
Originally Posted by JAYANTA_DATTA
I checked the same in my DB for the MQTs and the system catalogs showing correct number of records. Moreover if your table is in "n" different partitions ideally the system catalog shows you the total row count of the tables irrespective of the number of partitions.
|
Jayanta , based on IBM when you run the runstats, DB2 will only take the first node for the sampling and saves that information in your catalogs.
If you ever see the card is same as your number of rows then it may mean all your rows are on partition.
|
|

01-20-09, 01:05
|
|
Registered User
|
|
Join Date: Oct 2004
Location: DELHI INDIA
Posts: 336
|
|
The MQTs I was refering are REPLICATED ones. So if you have 15 nodes, all the nodes have same number of records.
Second case is, if you talk about a DPF, I am always refering a table which is partitioned on HASH (partition-key) for the above example. You don't have any tablespace defined on the co-ordinator node, and you will be interested in the total number of records in the table across all the Nodes.
__________________
Jayanta Datta
DB2 UDB DBA
IBM India, Global Delivery
New Delhi
|
|

01-22-09, 09:10
|
|
Registered User
|
|
Join Date: Jul 2002
Location: ATL
Posts: 170
|
|
Quote:
|
Originally Posted by JAYANTA_DATTA
The MQTs I was refering are REPLICATED ones. So if you have 15 nodes, all the nodes have same number of records.
Second case is, if you talk about a DPF, I am always refering a table which is partitioned on HASH (partition-key) for the above example. You don't have any tablespace defined on the co-ordinator node, and you will be interested in the total number of records in the table across all the Nodes.
|
Jayanta , i just recreated my mQT with "distribute by hash" option and i see the rows are distributed across two nodes and i ran the runstats. Now the cardinality shows the total rows = 2*rows on first node.
Iam trying to figure out on how to create replicated MQTs. Do you have steps on how you did it.
Thx
Prasad
|
|

01-23-09, 05:36
|
|
Registered User
|
|
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
|
|
Replicated MQTs: use the REPLICATE keyword on the CREATE TABLE statement.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
|
|

01-23-09, 06:37
|
|
Registered User
|
|
Join Date: Oct 2004
Location: DELHI INDIA
Posts: 336
|
|
As Stolze has mentioned, you can created the replicated MQT that way. But you need to understand first whether you really need a Replicated MQT for your application. Using replicated MQTs improve collocation of joins for database partitioning as well as reduce the Intra-Node communication in a multi-node situation.
__________________
Jayanta Datta
DB2 UDB DBA
IBM India, Global Delivery
New Delhi
|
|

01-23-09, 13:44
|
|
Registered User
|
|
Join Date: Jul 2002
Location: ATL
Posts: 170
|
|
I dont see any Broadcasting , so iam not worried about collocation at this time.When i used hash distribution for MQT , i see huge performance gains.
Thank you guys for the info.
|
|

01-27-09, 05:11
|
|
Registered User
|
|
Join Date: Oct 2004
Location: DELHI INDIA
Posts: 336
|
|
Great that HASHING has improved the performance significantly. You can also try running COMPRESSION ON the MQT (followed by REORG). You can achive around 55-65% compression on MQTs based on the data-quality. This will ensure that lesser number of data-pages will be scanned while querying the same.
__________________
Jayanta Datta
DB2 UDB DBA
IBM India, Global Delivery
New Delhi
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|