Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2013
    Posts
    6

    Post Unanswered: identify number of nodes of a tabel using system table

    Hello All,

    Currently I am using the below query to identify the number of nodes involved in a table.

    SELECT NODENUMBER(column_name) FROM tablename GROUP BY NODENUMBER(column_name)

    Is there any other way to identify the same using system/catalog table?

  2. #2
    Join Date
    Apr 2012
    Posts
    1,034
    Provided Answers: 18
    The tablespace(s) are part of a database partition-group - you can query the number of partitions in the DPG...

  3. #3
    Join Date
    Oct 2013
    Posts
    6

    Post

    That will give only info about partitions of a table, I want to know at a node level like in how many nodes data is distributed across for a particular table

  4. #4
    Join Date
    Apr 2012
    Posts
    1,034
    Provided Answers: 18
    If you know the tablespace(s) for a table (syscat.tables), then you find the DPG for these tablespaces(syscat.tablespaces.dbpgname), then you find the number of nodes in that dbp (syscat.dbpartitiongroupdef).
    DB2 will try to evenly distribute data over the nodes that are defined for the DPG

  5. #5
    Join Date
    Oct 2013
    Posts
    6

    Cool

    Thanks a lot db2mor

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •