Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2006
    Location
    Tuticorin, India
    Posts
    103

    Unanswered: DB2 9: Partitioned Table Vs Regular Table

    Env: DB2 9.1/AIX 5.3

    Is there any method to find out whether a table is non-partitioned or 'table-partitioned' in DB2 9.1?

    SYSCAT.TABLES.PARTITION_MODE differentiates other partitioning method except table partitioning
    H = Hashing
    R = Replicated across database partitions
    Blank = No database partitioning

    Eg: CREATE TABLE RATIO
    (PERCENT INTEGER)
    PARTITION BY RANGE (PERCENT)
    (STARTING (MINVALUE) ENDING (MAXVALUE))

    Thanks for looking

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    I am not 100% certain, but if you look in syscat.datapartitions--if there is more than one, then it will be a table partitioned table. There is also an entry in syscat.datapartitionexpression if the table is table partitioned -- this is probably the best way to tell.

    I also noticed, at least in V9.5 of the control center, viewing the tabe definition, the tablespace will show "Partitioned Table".

    Andy

  3. #3
    Join Date
    Jan 2009
    Location
    Zoetermeer, Holland
    Posts
    746
    Code:
    db2 describe data partitions for table john.doe  show detail
    The "show detail" is optional

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Quote Originally Posted by dr_te_z
    Code:
    db2 describe data partitions for table john.doe  show detail
    The "show detail" is optional
    This will still give you information for a non-partitioned table.

    Andy

  5. #5
    Join Date
    Mar 2006
    Location
    Tuticorin, India
    Posts
    103
    syscat.datapartitionexpression is the best way as it shows 1 row for each partitioned table.

    Thanks

Posting Permissions

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