Results 1 to 3 of 3
  1. #1
    Join Date
    May 2010

    Unanswered: range partitioning

    I am learning to implement range partitioning on AIX 5.3, DB2 V9.1. I created a table and then tried knowing which Tablespace it got associated with:

    db2 "CREATE TABLE orders(id INT, shipdate DATE) PARTITION BY RANGE(shipdate) ( STARTING '1/1/2006' ENDING '12/31/2006'EVERY 3 MONTHS)"

    From syscat.tables, I found TBSPACEID was -6 but there was no such tablespace with this ID in syscat.tablespaces. How do I know which container the data is going into?

  2. #2
    Join Date
    Aug 2008
    Toronto, Canada
    describe data partitions for table <table name> show detail

    You can also query sysibm.sysdatapartitions

  3. #3
    Join Date
    Jan 2009
    Zoetermeer, Holland
    Quote Originally Posted by db2cap View Post
    How do I know which container the data is going into?
    Wrong question. Using this syntax you get multiple "tables" in 1 tablespace. The tablespace uses 1 or more containers as usual. Nothing special there.
    I suppose you wonder about the spead of "tables" in your tablespace. Now we see that db2girl is capable of giving the right anwer to a wrong question ... wow!

Posting Permissions

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