{"Entry":{"collection":"relopts","key":"table-fillfactor","name":"fillfactor","aliases":["table.fillfactor"],"metadata":{"aliases":["table.fillfactor"],"category":"Tables and materialized views","content_hash":"366fcc8f677ec587eb8aa29c33e5e04d1012c238510c7674fb3f79ca1cc75c00","derived_content_hash":"9baed1829d4eed39eb342707f6ae5339afdfc5d64d9cd1f1d1e4eeb6a871daf7","imported_at":"2026-09-30T17:44:22.243151+08:00","name":"fillfactor","name_zh":"Tables and materialized views fillfactor","repair_provenance":{"original_source_revision":"","receipt_sha256":"eb8edcca8a6fd9f6e9aceb657dff115ab510032fa5edb0e6101881912a1cdd7f","repair":"wiki-repair-20261023"},"slug":"table-fillfactor","source_rev":"wiki-repair-20261023:41a12b601d480354273655b4c3a6a6ca78243fd9d589bd3e1003b8ac36a9e94c","summary":"The fillfactor for a table is a percentage between 10 and 100. 100 (complete packing) is the default. When a smaller fillfactor is specified, INSERT operations pack table pages only to the indicated percentage; the remaining space on each page is reserved for updating rows on that page. This gives UPDATE a chance to place the updated copy of a row on the same page as the original, which is more efficient than placing it on a different page, and makes heap-only tuple updates more likely. For a table whose entries are never updated, complete packing is the best choice, but in heavily updated tables smaller fillfactors are appropriate. This parameter cannot be set for TOAST tables."}},"Definition":{"Collection":"relopts","Key":"table-fillfactor","SourceDatabase":"center","Version":"18","SourceTable":"relopt","SourceKey":"table-fillfactor","SourceRevision":"eb6c2292fdf28e1b4635ab478eec3919411cdf4a6c07553387870e26201f3744","Facts":{"description":["The fillfactor for a table is a percentage between 10 and 100. 100 (complete packing) is the default. When a smaller fillfactor is specified, INSERT operations pack table pages only to the indicated percentage; the remaining space on each page is reserved for updating rows on that page. This gives UPDATE a chance to place the updated copy of a row on the same page as the original, which is more efficient than placing it on a different page, and makes heap-only tuple updates more likely. For a table whose entries are never updated, complete packing is the best choice, but in heavily updated tables smaller fillfactors are appropriate. This parameter cannot be set for TOAST tables."],"description_zh":"表的填充因子是介于 10 和 100 之间的百分比。100（完全填充）是默认值。当指定较小的填充因子时，INSERT 操作只会把表页填充到指定百分比；每页剩余的空间则预留给更新该页上的行。这使得 UPDATE 有机会将更新后的行副本放在与原始行相同的页上，这比放在不同页上更高效，也更有可能发生堆内元组更新。对于条目永远不会更新的表，完全填充是最佳选择；但对频繁更新的表来说，较小的填充因子更合适。不能为 TOAST 表设置此参数。","description_zh_html":"\u003cp\u003e\n      表的填充因子是介于 10 和 100 之间的百分比。100（完全填充）是默认值。当指定较小的填充因子时，\u003ccode class=\"command\"\u003eINSERT\u003c/code\u003e 操作只会把表页填充到指定百分比；每页剩余的空间则预留给更新该页上的行。这使得\n      \u003ccode class=\"command\"\u003eUPDATE\u003c/code\u003e 有机会将更新后的行副本放在与原始行相同的页上，这比放在不同页上更高效，也更有可能发生\u003ca class=\"link\" href=\"/zh/docs/18/storage-hot.html\" title=\"66.7. 堆内元组（HOT）\"\u003e堆内元组更新\u003c/a\u003e。对于条目永远不会更新的表，完全填充是最佳选择；但对频繁更新的表来说，较小的填充因子更合适。不能为\n      TOAST 表设置此参数。\n     \u003c/p\u003e","facts":[{"label":"Applies to","value":"Tables and materialized views"},{"label":"Value type","value":"integer"},{"label":"Default","value":"100"},{"label":"Range","value":"10–100 percent"}],"related":[{"label":"CREATE TABLE","url":"/wiki/sql/create-table/?v=18"}],"release":{"channel":"stable","label":"18.6","major":"18","ref":"Local English manual 18.6","revision":"eb6c2292fdf28e1b4635ab478eec3919411cdf4a6c07553387870e26201f3744"},"sections":[{"paragraphs":["This relation-level setting applies to the table or materialized view. Any corresponding global parameter has a separate entry."],"title":"Scope"},{"paragraphs":["The WITH clause can specify storage parameters for tables, and for indexes associated with a UNIQUE , PRIMARY KEY , or EXCLUDE constraint. Storage parameters for indexes are documented in CREATE INDEX . The storage parameters currently available for tables are listed below. For many of these parameters, as shown, there is an additional parameter with the same name prefixed with toast. , which controls the behavior of the table's secondary TOAST table, if any (see Section 66.2 for more information about TOAST). If a table parameter value is set and the equivalent toast. parameter is not, the TOAST table will use the table's parameter value. Specifying these parameters for partitioned tables is not supported, but you may specify them for individual leaf partitions."],"title":"Common table storage rules"},{"paragraphs":["This clause specifies optional storage parameters for the new materialized view; see Storage Parameters in the CREATE TABLE documentation for more information. All parameters supported for CREATE TABLE are also supported for CREATE MATERIALIZED VIEW . See CREATE TABLE for more information."],"title":"Materialized views"}],"signature":"WITH (fillfactor = value)","sources":[{"label":"PostgreSQL 18 English manual","path":"sql-createtable.html","sha256":"b4d703391fe1102d0e02bd6769bef928513eb7a5542f38f7448fc77fe69e0d5b","url":"/docs/18/sql-createtable.html#RELOPTION-FILLFACTOR"},{"label":"PostgreSQL 18 English manual","path":"sql-creatematerializedview.html","sha256":"bd8a6710c9f133afee191eb0ec345ef8c54bb54db2242621d8cb683c783a8b18","url":"/docs/18/sql-creatematerializedview.html"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/sql-createtable.html","sha256":"c044586c69b191e0f39966b25811a0c70f12fe2bf5e7f640501e53d76ca8f775"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-pgdoc"},"ManualEvidence":{"release":{"channel":"stable","label":"18.6","major":"18","ref":"Local English manual 18.6","revision":"eb6c2292fdf28e1b4635ab478eec3919411cdf4a6c07553387870e26201f3744"},"sources":[{"label":"PostgreSQL 18 English manual","path":"sql-createtable.html","sha256":"b4d703391fe1102d0e02bd6769bef928513eb7a5542f38f7448fc77fe69e0d5b","url":"/docs/18/sql-createtable.html#RELOPTION-FILLFACTOR"},{"label":"PostgreSQL 18 English manual","path":"sql-creatematerializedview.html","sha256":"bd8a6710c9f133afee191eb0ec345ef8c54bb54db2242621d8cb683c783a8b18","url":"/docs/18/sql-creatematerializedview.html"}]},"MeasuredEvidence":{}},"Text":{"Collection":"relopts","Key":"table-fillfactor","SourceDatabase":"center","Version":"18","Locale":"en","Title":"fillfactor","Summary":"The fillfactor for a table is a percentage between 10 and 100. 100 (complete packing) is the default. When a smaller fillfactor is specified, INSERT operations pack table pages only to the indicated percentage; the remaining space on each page is reserved for updating rows on that page. This gives UPDATE a chance to place the updated copy of a row on the same page as the original, which is more efficient than placing it on a different page, and makes heap-only tuple updates more likely. For a table whose entries are never updated, complete packing is the best choice, but in heavily updated tables smaller fillfactors are appropriate. This parameter cannot be set for TOAST tables.","BodyHTML":"\u003cp\u003eThe fillfactor for a table is a percentage between 10 and 100. 100 (complete packing) is the default. When a smaller fillfactor is specified, INSERT operations pack table pages only to the indicated percentage; the remaining space on each page is reserved for updating rows on that page. This gives UPDATE a chance to place the updated copy of a row on the same page as the original, which is more efficient than placing it on a different page, and makes heap-only tuple updates more likely. For a table whose entries are never updated, complete packing is the best choice, but in heavily updated tables smaller fillfactors are appropriate. This parameter cannot be set for TOAST tables.\u003c/p\u003e","SourceRevision":"eb6c2292fdf28e1b4635ab478eec3919411cdf4a6c07553387870e26201f3744","ContentHash":"fde28b9099532e9c0b7b08b85515a27cc02c20d66de3dfda84892877ab84bb79","Payload":{"description":["The fillfactor for a table is a percentage between 10 and 100. 100 (complete packing) is the default. When a smaller fillfactor is specified, INSERT operations pack table pages only to the indicated percentage; the remaining space on each page is reserved for updating rows on that page. This gives UPDATE a chance to place the updated copy of a row on the same page as the original, which is more efficient than placing it on a different page, and makes heap-only tuple updates more likely. For a table whose entries are never updated, complete packing is the best choice, but in heavily updated tables smaller fillfactors are appropriate. This parameter cannot be set for TOAST tables."],"related":[{"label":"CREATE TABLE","url":"/wiki/sql/create-table/?v=18"}],"sections":[{"paragraphs":["This relation-level setting applies to the table or materialized view. Any corresponding global parameter has a separate entry."],"title":"Scope"},{"paragraphs":["The WITH clause can specify storage parameters for tables, and for indexes associated with a UNIQUE , PRIMARY KEY , or EXCLUDE constraint. Storage parameters for indexes are documented in CREATE INDEX . The storage parameters currently available for tables are listed below. For many of these parameters, as shown, there is an additional parameter with the same name prefixed with toast. , which controls the behavior of the table's secondary TOAST table, if any (see Section 66.2 for more information about TOAST). If a table parameter value is set and the equivalent toast. parameter is not, the TOAST table will use the table's parameter value. Specifying these parameters for partitioned tables is not supported, but you may specify them for individual leaf partitions."],"title":"Common table storage rules"},{"paragraphs":["This clause specifies optional storage parameters for the new materialized view; see Storage Parameters in the CREATE TABLE documentation for more information. All parameters supported for CREATE TABLE are also supported for CREATE MATERIALIZED VIEW . See CREATE TABLE for more information."],"title":"Materialized views"}]}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
