0
votes

I create partition by list, but not define tablespaces for each PARTITION. What happens then?:

CREATE TABLE movie_genres (
    movie_genre_id INT NOT NULL,
    movie_id INT NOT NULL,
    genre_id INT NOT NULL,
    PRIMARY KEY (movie_genre_id),
    FOREIGN KEY (movie_id) REFERENCES movies(movie_id),
    FOREIGN KEY (genre_id) REFERENCES GENRES(genre_id),
    UNIQUE (movie_id, genre_id)
)
  PARTITION BY LIST(GENRE_ID)
  ( PARTITION Drama VALUES (8),
    PARTITION Comedy VALUES (5)
  );
1
As @imtravb indicates below, the partition is created in the default tablespace. This may or may not be a problem, depending on your environment. If this is just a "play-fun" database it's probably not a big deal. If you're in a production business environment the partitions in question may end up consuming a large proportion of a small tablespace. Best of luck.Bob Jarvis - Reinstate Monica

1 Answers

1
votes

Select def_tablespace_name from dba(all,user)_part_tables;