我有下表:
CREATE TABLE my_table (
table_a_id integer NOT NULL,
table_b_id integer NOT NULL,
table_c_id integer NOT NULL,
data numeric(30, 0) NOT NULL
);
CREATE UNIQUE INDEX my_index ON my_table (table_a_id, table_b_id, table_c_id);
据我所知,似乎我将磁盘空间加倍,因为每个索引行都有表中三个字段的副本
(table_a_id, table_b_id, table_c_id)
加上指向表行的“项目标识符”。有没有一种方法(在 PostgreSQL 中)使用相同的磁盘空间创建一个只有一个索引的表?