What is a table partition?
- As a simple definition The table Partition is a process of dividing large data tables into small manageable parts, such that each part has its own name and characteristics.
What is a vertical partition?
- vertical partitioning is to reduce the I/O and performance costs associated with fetching items that are frequently accessed
- it involves creating tables with fewer columns and using additional tables to store the remaining columns.
codes:
CREATE TABLE ProductA
(
id integer NOT NULL,
name text,
short_description varchar(200),
price varchar(100),
CONSTRAINT pk_pa PRIMARY KEY (id)
)
CREATE TABLE ProductB
(
id integer NOT NULL,
long_description text,
CONSTRAINT "PK_PB" PRIMARY KEY (id),
CONSTRAINT "FK_PID" FOREIGN KEY (id)
REFERENCES ProductA (id) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE
)
#postgresql #tablepartition #verticalpartition
Смотрите видео Vertical Partition In Postgresql | What is a vertical Partition in Postgresql? онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь mynotesoracledba 11 Май 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 527 раз и оно понравилось 2 людям.