Re: Fillfactor question
От | Greg Sabino Mullane |
---|---|
Тема | Re: Fillfactor question |
Дата | |
Msg-id | CAKAnmmJ2FFFgcQEcti9GTr-HGZsiTL=5AMMtNQP1SJBNxB22=g@mail.gmail.com обсуждение исходный текст |
Ответ на | Fillfactor question (Bzzzz <lazyvirus@gmx.com>) |
Ответы |
Re: Fillfactor question
|
Список | pgsql-novice |
On Wed, May 14, 2025 at 5:29 AM Bzzzz <lazyvirus@gmx.com> wrote:
does creating a table with fillfactor=75 automatically propagate to its
indexes or am I obliged to also modify their fillfactor accordingly ?
They are separate, so you will need to modify both. Here's a quick example:
greg=# create table bzzzz(id int) with (fillfactor=75);
CREATE TABLE
greg=# create index bzzzz_index1 on bzzzz(id);
CREATE INDEX
greg=# create index bzzzz_index2 on bzzzz(id) with (fillfactor=42);
CREATE INDEX
greg=# select relname, relkind, reloptions from pg_class where relname ~ 'bzzzz';
relname | relkind | reloptions
--------------+---------+-----------------
bzzzz | r | {fillfactor=75}
bzzzz_index1 | i | ☃
bzzzz_index2 | i | {fillfactor=42}
(3 rows)
CREATE TABLE
greg=# create index bzzzz_index1 on bzzzz(id);
CREATE INDEX
greg=# create index bzzzz_index2 on bzzzz(id) with (fillfactor=42);
CREATE INDEX
greg=# select relname, relkind, reloptions from pg_class where relname ~ 'bzzzz';
relname | relkind | reloptions
--------------+---------+-----------------
bzzzz | r | {fillfactor=75}
bzzzz_index1 | i | ☃
bzzzz_index2 | i | {fillfactor=42}
(3 rows)
Tables and indexes are both technically "relations", as seen in the pg_class table above ("rel" = "relation"). An index points to specific columns in a table, but otherwise is very distinct from it and no inheritance flows either direction.
Cheers,
Greg
--
Crunchy Data - https://www.crunchydata.com
Enterprise Postgres Software Products & Tech Support
В списке pgsql-novice по дате отправления: