{"kind": "storage", "major": "18", "item": {"slug": "storage-hot", "name": "Heap-Only Tuples ( HOT )", "name_zh": "", "category": "Physical structures", "summary": "To allow for high concurrency, PostgreSQL uses multiversion concurrency control ( MVCC ) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive.", "aliases": [], "content_hash": "7833c1bc0b75b0b66a9b5673cd12bbbc69e7755b583ddd702ed0f2ff9abb1fdc", "versions": {"11": {"facts": [{"label": "Definition scope", "value": "Same-version core physical storage documentation"}], "tables": [], "related": [{"url": "/wiki/relopts/?v=11", "label": "Storage Parameters"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v11.22/postgresql-11.22.tar.bz2", "label": "11.22", "major": "11", "channel": "stable", "revision": "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0"}, "sources": [{"url": "/docs/11/storage-hot.html", "path": "storage-hot.html", "label": "PostgreSQL 11 English manual", "sha256": "b8059d9d68ff54c7025b275af572c8bcbd187101417c6a594441f29cae47e037"}], "sections": [], "signature": "", "description": ["To allow for high concurrency, PostgreSQL uses multiversion concurrency control ( MVCC ) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive."], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">69.7.\u00a0Heap-Only Tuples (HOT)</h2>\n</div>\n</div>\n</div>\n<p>To allow for high concurrency, <span class=\"productname\">PostgreSQL</span> uses <a class=\"link\" href=\"/docs/11/mvcc-intro.html\" title=\"13.1.\u00a0Introduction\">multiversion concurrency control</a> (MVCC) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive.</p>\n<p>To help reduce the overhead of updates, <span class=\"productname\">PostgreSQL</span> has an optimization called heap-only tuples (HOT). This optimization is possible when:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>The update does not modify any columns referenced by the table's indexes, including expression and partial indexes.</p>\n</li>\n<li class=\"listitem\">\n<p>There is sufficient free space on the page containing the old row for the updated row.</p>\n</li>\n</ul>\n</div>\n<p>In such cases, heap-only tuples provide two optimizations:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>New index entries are not needed to represent updated rows.</p>\n</li>\n<li class=\"listitem\">\n<p>Old versions of updated rows can be completely removed during normal operation, including <code class=\"command\">SELECT</code>s, instead of requiring periodic vacuum operations. (This is possible because indexes do not reference their <a class=\"link\" href=\"/docs/11/storage-page-layout.html\" title=\"69.6.\u00a0Database Page Layout\">page item identifiers</a>.)</p>\n</li>\n</ul>\n</div>\n<p>In summary, heap-only tuple updates can only be created if columns used by indexes are not updated. You can increase the likelihood of sufficient page space for HOT updates by decreasing a table's <a class=\"link\" href=\"/docs/11/sql-createtable.html\" title=\"CREATE TABLE\"><code class=\"literal\">fillfactor</code></a>. If you don't, HOT updates will still happen because new rows will naturally migrate to new pages and existing pages with sufficient free space for new row versions. The system view <a class=\"link\" href=\"/docs/11/monitoring-stats.html#PG-STAT-ALL-TABLES-VIEW\" title=\"Table\u00a028.13.\u00a0pg_stat_all_tables View\">pg_stat_all_tables</a> allows monitoring of the occurrence of HOT and non-HOT updates.</p>\n</div>", "manual_path": "/docs/11/storage-hot.html", "comparison_data": {"layouts": []}, "comparison_hash": "27341929154bfb55531f03501322b65af719c5561f3c4ddc9528a14aa4df69b5"}, "12": {"facts": [{"label": "Definition scope", "value": "Same-version core physical storage documentation"}], "tables": [], "related": [{"url": "/wiki/tableam/?v=12", "label": "Table AM"}, {"url": "/wiki/relopts/?v=12", "label": "Storage Parameters"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v12.22/postgresql-12.22.tar.bz2", "label": "12.22", "major": "12", "channel": "stable", "revision": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b"}, "sources": [{"url": "/docs/12/storage-hot.html", "path": "storage-hot.html", "label": "PostgreSQL 12 English manual", "sha256": "542148afd017c2de963e269f0482c2d221d0538dcf3e677d662a29e5a044e906"}], "sections": [], "signature": "", "description": ["To allow for high concurrency, PostgreSQL uses multiversion concurrency control ( MVCC ) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive."], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">69.7.\u00a0Heap-Only Tuples (HOT)</h2>\n</div>\n</div>\n</div>\n<p>To allow for high concurrency, <span class=\"productname\">PostgreSQL</span> uses <a class=\"link\" href=\"/docs/12/mvcc-intro.html\" title=\"13.1.\u00a0Introduction\">multiversion concurrency control</a> (MVCC) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive.</p>\n<p>To help reduce the overhead of updates, <span class=\"productname\">PostgreSQL</span> has an optimization called heap-only tuples (HOT). This optimization is possible when:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>The update does not modify any columns referenced by the table's indexes, including expression and partial indexes.</p>\n</li>\n<li class=\"listitem\">\n<p>There is sufficient free space on the page containing the old row for the updated row.</p>\n</li>\n</ul>\n</div>\n<p>In such cases, heap-only tuples provide two optimizations:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>New index entries are not needed to represent updated rows.</p>\n</li>\n<li class=\"listitem\">\n<p>Old versions of updated rows can be completely removed during normal operation, including <code class=\"command\">SELECT</code>s, instead of requiring periodic vacuum operations. (This is possible because indexes do not reference their <a class=\"link\" href=\"/docs/12/storage-page-layout.html\" title=\"69.6.\u00a0Database Page Layout\">page item identifiers</a>.)</p>\n</li>\n</ul>\n</div>\n<p>In summary, heap-only tuple updates can only be created if columns used by indexes are not updated. You can increase the likelihood of sufficient page space for HOT updates by decreasing a table's <a class=\"link\" href=\"/docs/12/sql-createtable.html#RELOPTION-FILLFACTOR\"><code class=\"literal\">fillfactor</code></a>. If you don't, HOT updates will still happen because new rows will naturally migrate to new pages and existing pages with sufficient free space for new row versions. The system view <a class=\"link\" href=\"/docs/12/monitoring-stats.html#PG-STAT-ALL-TABLES-VIEW\" title=\"Table\u00a027.14.\u00a0pg_stat_all_tables View\">pg_stat_all_tables</a> allows monitoring of the occurrence of HOT and non-HOT updates.</p>\n</div>", "manual_path": "/docs/12/storage-hot.html", "comparison_data": {"layouts": []}, "comparison_hash": "27341929154bfb55531f03501322b65af719c5561f3c4ddc9528a14aa4df69b5"}, "13": {"facts": [{"label": "Definition scope", "value": "Same-version core physical storage documentation"}], "tables": [], "related": [{"url": "/wiki/tableam/?v=13", "label": "Table AM"}, {"url": "/wiki/relopts/?v=13", "label": "Storage Parameters"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v13.23/postgresql-13.23.tar.bz2", "label": "13.23", "major": "13", "channel": "stable", "revision": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6"}, "sources": [{"url": "/docs/13/storage-hot.html", "path": "storage-hot.html", "label": "PostgreSQL 13 English manual", "sha256": "53c16d6399cb9405b10ada745f4811e61a208b129e55658316ce78dde6f1c72e"}], "sections": [], "signature": "", "description": ["To allow for high concurrency, PostgreSQL uses multiversion concurrency control ( MVCC ) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive."], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">69.7.\u00a0Heap-Only Tuples (HOT)</h2>\n</div>\n</div>\n</div>\n<p>To allow for high concurrency, <span class=\"productname\">PostgreSQL</span> uses <a class=\"link\" href=\"/docs/13/mvcc-intro.html\" title=\"13.1.\u00a0Introduction\">multiversion concurrency control</a> (MVCC) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive.</p>\n<p>To help reduce the overhead of updates, <span class=\"productname\">PostgreSQL</span> has an optimization called heap-only tuples (HOT). This optimization is possible when:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>The update does not modify any columns referenced by the table's indexes, including expression and partial indexes.</p>\n</li>\n<li class=\"listitem\">\n<p>There is sufficient free space on the page containing the old row for the updated row.</p>\n</li>\n</ul>\n</div>\n<p>In such cases, heap-only tuples provide two optimizations:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>New index entries are not needed to represent updated rows.</p>\n</li>\n<li class=\"listitem\">\n<p>Old versions of updated rows can be completely removed during normal operation, including <code class=\"command\">SELECT</code>s, instead of requiring periodic vacuum operations. (This is possible because indexes do not reference their <a class=\"link\" href=\"/docs/13/storage-page-layout.html\" title=\"69.6.\u00a0Database Page Layout\">page item identifiers</a>.)</p>\n</li>\n</ul>\n</div>\n<p>In summary, heap-only tuple updates can only be created if columns used by indexes are not updated. You can increase the likelihood of sufficient page space for HOT updates by decreasing a table's <a class=\"link\" href=\"/docs/13/sql-createtable.html#RELOPTION-FILLFACTOR\"><code class=\"literal\">fillfactor</code></a>. If you don't, HOT updates will still happen because new rows will naturally migrate to new pages and existing pages with sufficient free space for new row versions. The system view <a class=\"link\" href=\"/docs/13/monitoring-stats.html#MONITORING-PG-STAT-ALL-TABLES-VIEW\" title=\"27.2.13.\u00a0pg_stat_all_tables\">pg_stat_all_tables</a> allows monitoring of the occurrence of HOT and non-HOT updates.</p>\n</div>", "manual_path": "/docs/13/storage-hot.html", "comparison_data": {"layouts": []}, "comparison_hash": "27341929154bfb55531f03501322b65af719c5561f3c4ddc9528a14aa4df69b5"}, "14": {"facts": [{"label": "Definition scope", "value": "Same-version core physical storage documentation"}], "tables": [], "related": [{"url": "/wiki/tableam/?v=14", "label": "Table AM"}, {"url": "/wiki/relopts/?v=14", "label": "Storage Parameters"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2", "label": "14.24", "major": "14", "channel": "stable", "revision": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897"}, "sources": [{"url": "/docs/14/storage-hot.html", "path": "storage-hot.html", "label": "PostgreSQL 14 English manual", "sha256": "0a19c2cba66e8ded09f20039eeb46932c988a5dfc56f4caa9e40a1c20f1d3c02"}], "sections": [], "signature": "", "description": ["To allow for high concurrency, PostgreSQL uses multiversion concurrency control ( MVCC ) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive."], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">70.7.\u00a0Heap-Only Tuples (HOT)</h2>\n</div>\n</div>\n</div>\n<p>To allow for high concurrency, <span class=\"productname\">PostgreSQL</span> uses <a class=\"link\" href=\"/docs/14/mvcc-intro.html\" title=\"13.1.\u00a0Introduction\">multiversion concurrency control</a> (MVCC) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive.</p>\n<p>To help reduce the overhead of updates, <span class=\"productname\">PostgreSQL</span> has an optimization called heap-only tuples (HOT). This optimization is possible when:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>The update does not modify any columns referenced by the table's indexes, including expression and partial indexes.</p>\n</li>\n<li class=\"listitem\">\n<p>There is sufficient free space on the page containing the old row for the updated row.</p>\n</li>\n</ul>\n</div>\n<p>In such cases, heap-only tuples provide two optimizations:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>New index entries are not needed to represent updated rows.</p>\n</li>\n<li class=\"listitem\">\n<p>Old versions of updated rows can be completely removed during normal operation, including <code class=\"command\">SELECT</code>s, instead of requiring periodic vacuum operations. (This is possible because indexes do not reference their <a class=\"link\" href=\"/docs/14/storage-page-layout.html\" title=\"70.6.\u00a0Database Page Layout\">page item identifiers</a>.)</p>\n</li>\n</ul>\n</div>\n<p>In summary, heap-only tuple updates can only be created if columns used by indexes are not updated. You can increase the likelihood of sufficient page space for HOT updates by decreasing a table's <a class=\"link\" href=\"/docs/14/sql-createtable.html#RELOPTION-FILLFACTOR\"><code class=\"literal\">fillfactor</code></a>. If you don't, HOT updates will still happen because new rows will naturally migrate to new pages and existing pages with sufficient free space for new row versions. The system view <a class=\"link\" href=\"/docs/14/monitoring-stats.html#MONITORING-PG-STAT-ALL-TABLES-VIEW\" title=\"28.2.15.\u00a0pg_stat_all_tables\">pg_stat_all_tables</a> allows monitoring of the occurrence of HOT and non-HOT updates.</p>\n</div>", "manual_path": "/docs/14/storage-hot.html", "comparison_data": {"layouts": []}, "comparison_hash": "27341929154bfb55531f03501322b65af719c5561f3c4ddc9528a14aa4df69b5"}, "15": {"facts": [{"label": "Definition scope", "value": "Same-version core physical storage documentation"}], "tables": [], "related": [{"url": "/wiki/tableam/?v=15", "label": "Table AM"}, {"url": "/wiki/relopts/?v=15", "label": "Storage Parameters"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v15.19/postgresql-15.19.tar.bz2", "label": "15.19", "major": "15", "channel": "stable", "revision": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89"}, "sources": [{"url": "/docs/15/storage-hot.html", "path": "storage-hot.html", "label": "PostgreSQL 15 English manual", "sha256": "31355e5d6862558e5792566b5af1ac97482933346a8dfc4973df0751be3b2efc"}], "sections": [], "signature": "", "description": ["To allow for high concurrency, PostgreSQL uses multiversion concurrency control ( MVCC ) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive."], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">73.7.\u00a0Heap-Only Tuples (HOT)</h2>\n</div>\n</div>\n</div>\n<p>To allow for high concurrency, <span class=\"productname\">PostgreSQL</span> uses <a class=\"link\" href=\"/docs/15/mvcc-intro.html\" title=\"13.1.\u00a0Introduction\">multiversion concurrency control</a> (MVCC) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive.</p>\n<p>To help reduce the overhead of updates, <span class=\"productname\">PostgreSQL</span> has an optimization called heap-only tuples (HOT). This optimization is possible when:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>The update does not modify any columns referenced by the table's indexes, including expression and partial indexes.</p>\n</li>\n<li class=\"listitem\">\n<p>There is sufficient free space on the page containing the old row for the updated row.</p>\n</li>\n</ul>\n</div>\n<p>In such cases, heap-only tuples provide two optimizations:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>New index entries are not needed to represent updated rows.</p>\n</li>\n<li class=\"listitem\">\n<p>Old versions of updated rows can be completely removed during normal operation, including <code class=\"command\">SELECT</code>s, instead of requiring periodic vacuum operations. (This is possible because indexes do not reference their <a class=\"link\" href=\"/docs/15/storage-page-layout.html\" title=\"73.6.\u00a0Database Page Layout\">page item identifiers</a>.)</p>\n</li>\n</ul>\n</div>\n<p>In summary, heap-only tuple updates can only be created if columns used by indexes are not updated. You can increase the likelihood of sufficient page space for HOT updates by decreasing a table's <a class=\"link\" href=\"/docs/15/sql-createtable.html#RELOPTION-FILLFACTOR\"><code class=\"literal\">fillfactor</code></a>. If you don't, HOT updates will still happen because new rows will naturally migrate to new pages and existing pages with sufficient free space for new row versions. The system view <a class=\"link\" href=\"/docs/15/monitoring-stats.html#MONITORING-PG-STAT-ALL-TABLES-VIEW\" title=\"28.2.17.\u00a0pg_stat_all_tables\">pg_stat_all_tables</a> allows monitoring of the occurrence of HOT and non-HOT updates.</p>\n</div>", "manual_path": "/docs/15/storage-hot.html", "comparison_data": {"layouts": []}, "comparison_hash": "27341929154bfb55531f03501322b65af719c5561f3c4ddc9528a14aa4df69b5"}, "16": {"facts": [{"label": "Definition scope", "value": "Same-version core physical storage documentation"}], "tables": [], "related": [{"url": "/wiki/tableam/?v=16", "label": "Table AM"}, {"url": "/wiki/relopts/?v=16", "label": "Storage Parameters"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v16.15/postgresql-16.15.tar.bz2", "label": "16.15", "major": "16", "channel": "stable", "revision": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed"}, "sources": [{"url": "/docs/16/storage-hot.html", "path": "storage-hot.html", "label": "PostgreSQL 16 English manual", "sha256": "46611e7b1a1f0dca5a5a6f0b103031a24e882f833efce1e03b0f88ff6c5e6f6c"}], "sections": [], "signature": "", "description": ["To allow for high concurrency, PostgreSQL uses multiversion concurrency control ( MVCC ) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive."], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">73.7.\u00a0Heap-Only Tuples (HOT) </h2>\n</div>\n</div>\n</div>\n<p>To allow for high concurrency, <span class=\"productname\">PostgreSQL</span> uses <a class=\"link\" href=\"/docs/16/mvcc-intro.html\" title=\"13.1.\u00a0Introduction\">multiversion concurrency control</a> (MVCC) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive.</p>\n<p>To help reduce the overhead of updates, <span class=\"productname\">PostgreSQL</span> has an optimization called heap-only tuples (HOT). This optimization is possible when:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>The update does not modify any columns referenced by the table's indexes, not including summarizing indexes. The only summarizing index method in the core <span class=\"productname\">PostgreSQL</span> distribution is <a class=\"link\" href=\"/docs/16/brin.html\" title=\"Chapter\u00a071.\u00a0BRIN Indexes\">BRIN</a>.</p>\n</li>\n<li class=\"listitem\">\n<p>There is sufficient free space on the page containing the old row for the updated row.</p>\n</li>\n</ul>\n</div>\n<p>In such cases, heap-only tuples provide two optimizations:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>New index entries are not needed to represent updated rows, however, summary indexes may still need to be updated.</p>\n</li>\n<li class=\"listitem\">\n<p>Old versions of updated rows can be completely removed during normal operation, including <code class=\"command\">SELECT</code>s, instead of requiring periodic vacuum operations. (This is possible because indexes do not reference their <a class=\"link\" href=\"/docs/16/storage-page-layout.html\" title=\"73.6.\u00a0Database Page Layout\">page item identifiers</a>.)</p>\n</li>\n</ul>\n</div>\n<p>You can increase the likelihood of sufficient page space for HOT updates by decreasing a table's <a class=\"link\" href=\"/docs/16/sql-createtable.html#RELOPTION-FILLFACTOR\"><code class=\"literal\">fillfactor</code></a>. If you don't, HOT updates will still happen because new rows will naturally migrate to new pages and existing pages with sufficient free space for new row versions. The system view <a class=\"link\" href=\"/docs/16/monitoring-stats.html#MONITORING-PG-STAT-ALL-TABLES-VIEW\" title=\"28.2.18.\u00a0pg_stat_all_tables\">pg_stat_all_tables</a> allows monitoring of the occurrence of HOT and non-HOT updates.</p>\n</div>", "manual_path": "/docs/16/storage-hot.html", "comparison_data": {"layouts": []}, "comparison_hash": "27341929154bfb55531f03501322b65af719c5561f3c4ddc9528a14aa4df69b5"}, "17": {"facts": [{"label": "Definition scope", "value": "Same-version core physical storage documentation"}], "tables": [], "related": [{"url": "/wiki/tableam/?v=17", "label": "Table AM"}, {"url": "/wiki/relopts/?v=17", "label": "Storage Parameters"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v17.11/postgresql-17.11.tar.bz2", "label": "17.11", "major": "17", "channel": "stable", "revision": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979"}, "sources": [{"url": "/docs/17/storage-hot.html", "path": "storage-hot.html", "label": "PostgreSQL 17 English manual", "sha256": "97cea1175079a02c0e4df4f0d127902e35f32306296ef7bceed9f1fc8adae908"}], "sections": [], "signature": "", "description": ["To allow for high concurrency, PostgreSQL uses multiversion concurrency control ( MVCC ) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive."], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">65.7.\u00a0Heap-Only Tuples (HOT) </h2>\n</div>\n</div>\n</div>\n<p>To allow for high concurrency, <span class=\"productname\">PostgreSQL</span> uses <a class=\"link\" href=\"/docs/17/mvcc-intro.html\" title=\"13.1.\u00a0Introduction\">multiversion concurrency control</a> (MVCC) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive.</p>\n<p>To help reduce the overhead of updates, <span class=\"productname\">PostgreSQL</span> has an optimization called heap-only tuples (HOT). This optimization is possible when:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>The update does not modify any columns referenced by the table's indexes, not including summarizing indexes. The only summarizing index method in the core <span class=\"productname\">PostgreSQL</span> distribution is <a class=\"link\" href=\"/docs/17/brin.html\" title=\"64.5.\u00a0BRIN Indexes\">BRIN</a>.</p>\n</li>\n<li class=\"listitem\">\n<p>There is sufficient free space on the page containing the old row for the updated row.</p>\n</li>\n</ul>\n</div>\n<p>In such cases, heap-only tuples provide two optimizations:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>New index entries are not needed to represent updated rows, however, summary indexes may still need to be updated.</p>\n</li>\n<li class=\"listitem\">\n<p>When a row is updated multiple times, row versions other than the oldest and the newest can be completely removed during normal operation, including <code class=\"command\">SELECT</code>s, instead of requiring periodic vacuum operations. (Indexes always refer to the <a class=\"link\" href=\"/docs/17/storage-page-layout.html\" title=\"65.6.\u00a0Database Page Layout\">page item identifier</a> of the original row version. The tuple data associated with that row version is removed, and its item identifier is converted to a redirect that points to the oldest version that may still be visible to some concurrent transaction. Intermediate row versions that are no longer visible to anyone are completely removed, and the associated page item identifiers are made available for reuse.)</p>\n</li>\n</ul>\n</div>\n<p>You can increase the likelihood of sufficient page space for HOT updates by decreasing a table's <a class=\"link\" href=\"/docs/17/sql-createtable.html#RELOPTION-FILLFACTOR\"><code class=\"literal\">fillfactor</code></a>. If you don't, HOT updates will still happen because new rows will naturally migrate to new pages and existing pages with sufficient free space for new row versions. The system view <a class=\"link\" href=\"/docs/17/monitoring-stats.html#MONITORING-PG-STAT-ALL-TABLES-VIEW\" title=\"27.2.19.\u00a0pg_stat_all_tables\">pg_stat_all_tables</a> allows monitoring of the occurrence of HOT and non-HOT updates.</p>\n</div>", "manual_path": "/docs/17/storage-hot.html", "comparison_data": {"layouts": []}, "comparison_hash": "27341929154bfb55531f03501322b65af719c5561f3c4ddc9528a14aa4df69b5"}, "18": {"facts": [{"label": "Definition scope", "value": "Same-version core physical storage documentation"}], "tables": [], "related": [{"url": "/wiki/tableam/?v=18", "label": "Table AM"}, {"url": "/wiki/relopts/?v=18", "label": "Storage Parameters"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "18.6", "major": "18", "channel": "stable", "revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "sources": [{"url": "/docs/18/storage-hot.html", "path": "storage-hot.html", "label": "PostgreSQL 18 English manual", "sha256": "10b16ef2342681e7c41be6a1bc1e3ea1cb3ba9f592be29dcc941fba269713bfa"}], "sections": [], "signature": "", "description": ["To allow for high concurrency, PostgreSQL uses multiversion concurrency control ( MVCC ) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive."], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">66.7.\u00a0Heap-Only Tuples (HOT) </h2>\n</div>\n</div>\n</div>\n<p>To allow for high concurrency, <span class=\"productname\">PostgreSQL</span> uses <a class=\"link\" href=\"/docs/18/mvcc-intro.html\" title=\"13.1.\u00a0Introduction\">multiversion concurrency control</a> (MVCC) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive.</p>\n<p>To help reduce the overhead of updates, <span class=\"productname\">PostgreSQL</span> has an optimization called heap-only tuples (HOT). This optimization is possible when:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>The update does not modify any columns referenced by the table's indexes, not including summarizing indexes. The only summarizing index method in the core <span class=\"productname\">PostgreSQL</span> distribution is <a class=\"link\" href=\"/docs/18/brin.html\" title=\"65.5.\u00a0BRIN Indexes\">BRIN</a>.</p>\n</li>\n<li class=\"listitem\">\n<p>There is sufficient free space on the page containing the old row for the updated row.</p>\n</li>\n</ul>\n</div>\n<p>In such cases, heap-only tuples provide two optimizations:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>New index entries are not needed to represent updated rows, however, summary indexes may still need to be updated.</p>\n</li>\n<li class=\"listitem\">\n<p>When a row is updated multiple times, row versions other than the oldest and the newest can be completely removed during normal operation, including <code class=\"command\">SELECT</code>s, instead of requiring periodic vacuum operations. (Indexes always refer to the <a class=\"link\" href=\"/docs/18/storage-page-layout.html\" title=\"66.6.\u00a0Database Page Layout\">page item identifier</a> of the original row version. The tuple data associated with that row version is removed, and its item identifier is converted to a redirect that points to the oldest version that may still be visible to some concurrent transaction. Intermediate row versions that are no longer visible to anyone are completely removed, and the associated page item identifiers are made available for reuse.)</p>\n</li>\n</ul>\n</div>\n<p>You can increase the likelihood of sufficient page space for HOT updates by decreasing a table's <a class=\"link\" href=\"/docs/18/sql-createtable.html#RELOPTION-FILLFACTOR\"><code class=\"literal\">fillfactor</code></a>. If you don't, HOT updates will still happen because new rows will naturally migrate to new pages and existing pages with sufficient free space for new row versions. The system view <a class=\"link\" href=\"/docs/18/monitoring-stats.html#MONITORING-PG-STAT-ALL-TABLES-VIEW\" title=\"27.2.19.\u00a0pg_stat_all_tables\">pg_stat_all_tables</a> allows monitoring of the occurrence of HOT and non-HOT updates.</p>\n</div>", "manual_path": "/docs/18/storage-hot.html", "comparison_data": {"layouts": []}, "comparison_hash": "27341929154bfb55531f03501322b65af719c5561f3c4ddc9528a14aa4df69b5"}, "19": {"facts": [{"label": "Definition scope", "value": "Same-version core physical storage documentation"}], "tables": [], "related": [{"url": "/wiki/tableam/?v=19", "label": "Table AM"}, {"url": "/wiki/relopts/?v=19", "label": "Storage Parameters"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v19beta4/postgresql-19beta4.tar.bz2", "label": "19beta4", "major": "19", "channel": "preview", "revision": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86"}, "sources": [{"url": "/docs/19/storage-hot.html", "path": "storage-hot.html", "label": "PostgreSQL 19 English manual", "sha256": "5f0d8a61ee07763a66a81627086a5f9fd868b729048306e4cac89381bb2c4bfc"}], "sections": [], "signature": "", "description": ["To allow for high concurrency, PostgreSQL uses multiversion concurrency control ( MVCC ) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive."], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">66.7.\u00a0Heap-Only Tuples (HOT) </h2>\n</div>\n</div>\n</div>\n<p>To allow for high concurrency, <span class=\"productname\">PostgreSQL</span> uses <a class=\"link\" href=\"/docs/19/mvcc-intro.html\" title=\"13.1.\u00a0Introduction\">multiversion concurrency control</a> (MVCC) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive.</p>\n<p>To help reduce the overhead of updates, <span class=\"productname\">PostgreSQL</span> has an optimization called heap-only tuples (HOT). This optimization is possible when:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>The update does not modify any columns referenced by the table's indexes, not including summarizing indexes. The only summarizing index method in the core <span class=\"productname\">PostgreSQL</span> distribution is <a class=\"link\" href=\"/docs/19/brin.html\" title=\"65.5.\u00a0BRIN Indexes\">BRIN</a>.</p>\n</li>\n<li class=\"listitem\">\n<p>There is sufficient free space on the page containing the old row for the updated row.</p>\n</li>\n</ul>\n</div>\n<p>In such cases, heap-only tuples provide two optimizations:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>New index entries are not needed to represent updated rows, however, summary indexes may still need to be updated.</p>\n</li>\n<li class=\"listitem\">\n<p>When a row is updated multiple times, row versions other than the oldest and the newest can be completely removed during normal operation, including <code class=\"command\">SELECT</code>s, instead of requiring periodic vacuum operations. (Indexes always refer to the <a class=\"link\" href=\"/docs/19/storage-page-layout.html\" title=\"66.6.\u00a0Database Page Layout\">page item identifier</a> of the original row version. The tuple data associated with that row version is removed, and its item identifier is converted to a redirect that points to the oldest version that may still be visible to some concurrent transaction. Intermediate row versions that are no longer visible to anyone are completely removed, and the associated page item identifiers are made available for reuse.)</p>\n</li>\n</ul>\n</div>\n<p>You can increase the likelihood of sufficient page space for HOT updates by decreasing a table's <a class=\"link\" href=\"/docs/19/sql-createtable.html#RELOPTION-FILLFACTOR\"><code class=\"literal\">fillfactor</code></a>. If you don't, HOT updates will still happen because new rows will naturally migrate to new pages and existing pages with sufficient free space for new row versions. The system view <a class=\"link\" href=\"/docs/19/monitoring-stats.html#MONITORING-PG-STAT-ALL-TABLES-VIEW\" title=\"27.2.21.\u00a0pg_stat_all_tables\">pg_stat_all_tables</a> allows monitoring of the occurrence of HOT and non-HOT updates.</p>\n</div>", "manual_path": "/docs/19/storage-hot.html", "comparison_data": {"layouts": []}, "comparison_hash": "27341929154bfb55531f03501322b65af719c5561f3c4ddc9528a14aa4df69b5"}, "20": {"facts": [{"label": "Definition scope", "value": "Same-version core physical storage documentation"}], "tables": [], "related": [{"url": "/wiki/tableam/?v=20", "label": "Table AM"}, {"url": "/wiki/relopts/?v=20", "label": "Storage Parameters"}], "release": {"ref": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "label": "20devel", "major": "20", "channel": "devel", "revision": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41"}, "sources": [{"url": "/docs/devel/storage-hot.html", "path": "storage-hot.html", "label": "PostgreSQL 20 English manual", "sha256": "499eb2be3ab3c949e43aff88233e53b389b7e5f9b11edd21f95bb45ffd0725dd"}], "sections": [], "signature": "", "description": ["To allow for high concurrency, PostgreSQL uses multiversion concurrency control ( MVCC ) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive."], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">66.7.\u00a0Heap-Only Tuples (HOT) </h2>\n</div>\n</div>\n</div>\n<p>To allow for high concurrency, <span class=\"productname\">PostgreSQL</span> uses <a class=\"link\" href=\"/docs/devel/mvcc-intro.html\" title=\"13.1.\u00a0Introduction\">multiversion concurrency control</a> (MVCC) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive.</p>\n<p>To help reduce the overhead of updates, <span class=\"productname\">PostgreSQL</span> has an optimization called heap-only tuples (HOT). This optimization is possible when:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>The update does not modify any columns referenced by the table's indexes, not including summarizing indexes. The only summarizing index method in the core <span class=\"productname\">PostgreSQL</span> distribution is <a class=\"link\" href=\"/docs/devel/brin.html\" title=\"65.5.\u00a0BRIN Indexes\">BRIN</a>.</p>\n</li>\n<li class=\"listitem\">\n<p>There is sufficient free space on the page containing the old row for the updated row.</p>\n</li>\n</ul>\n</div>\n<p>In such cases, heap-only tuples provide two optimizations:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>New index entries are not needed to represent updated rows, however, summary indexes may still need to be updated.</p>\n</li>\n<li class=\"listitem\">\n<p>When a row is updated multiple times, row versions other than the oldest and the newest can be completely removed during normal operation, including <code class=\"command\">SELECT</code>s, instead of requiring periodic vacuum operations. (Indexes always refer to the <a class=\"link\" href=\"/docs/devel/storage-page-layout.html\" title=\"66.6.\u00a0Database Page Layout\">page item identifier</a> of the original row version. The tuple data associated with that row version is removed, and its item identifier is converted to a redirect that points to the oldest version that may still be visible to some concurrent transaction. Intermediate row versions that are no longer visible to anyone are completely removed, and the associated page item identifiers are made available for reuse.)</p>\n</li>\n</ul>\n</div>\n<p>You can increase the likelihood of sufficient page space for HOT updates by decreasing a table's <a class=\"link\" href=\"/docs/devel/sql-createtable.html#RELOPTION-FILLFACTOR\"><code class=\"literal\">fillfactor</code></a>. If you don't, HOT updates will still happen because new rows will naturally migrate to new pages and existing pages with sufficient free space for new row versions. The system view <a class=\"link\" href=\"/docs/devel/monitoring-stats.html#MONITORING-PG-STAT-ALL-TABLES-VIEW\" title=\"27.2.22.\u00a0pg_stat_all_tables\">pg_stat_all_tables</a> allows monitoring of the occurrence of HOT and non-HOT updates.</p>\n</div>", "manual_path": "/docs/devel/storage-hot.html", "comparison_data": {"layouts": []}, "comparison_hash": "27341929154bfb55531f03501322b65af719c5561f3c4ddc9528a14aa4df69b5"}}}, "snapshot": {"facts": [{"label": "Definition scope", "value": "Same-version core physical storage documentation"}], "tables": [], "related": [{"url": "/wiki/tableam/?v=18", "label": "Table AM"}, {"url": "/wiki/relopts/?v=18", "label": "Storage Parameters"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "18.6", "major": "18", "channel": "stable", "revision": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "sources": [{"url": "/docs/18/storage-hot.html", "path": "storage-hot.html", "label": "PostgreSQL 18 English manual", "sha256": "10b16ef2342681e7c41be6a1bc1e3ea1cb3ba9f592be29dcc941fba269713bfa"}], "sections": [], "signature": "", "description": ["To allow for high concurrency, PostgreSQL uses multiversion concurrency control ( MVCC ) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive."], "manual_html": "<div class=\"sect1\">\n<div class=\"titlepage\">\n<div>\n<div>\n<h2 class=\"title\">66.7.\u00a0Heap-Only Tuples (HOT) </h2>\n</div>\n</div>\n</div>\n<p>To allow for high concurrency, <span class=\"productname\">PostgreSQL</span> uses <a class=\"link\" href=\"/docs/18/mvcc-intro.html\" title=\"13.1.\u00a0Introduction\">multiversion concurrency control</a> (MVCC) to store rows. However, MVCC has some downsides for update queries. Specifically, updates require new versions of rows to be added to tables. This can also require new index entries for each updated row, and removal of old versions of rows and their index entries can be expensive.</p>\n<p>To help reduce the overhead of updates, <span class=\"productname\">PostgreSQL</span> has an optimization called heap-only tuples (HOT). This optimization is possible when:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>The update does not modify any columns referenced by the table's indexes, not including summarizing indexes. The only summarizing index method in the core <span class=\"productname\">PostgreSQL</span> distribution is <a class=\"link\" href=\"/docs/18/brin.html\" title=\"65.5.\u00a0BRIN Indexes\">BRIN</a>.</p>\n</li>\n<li class=\"listitem\">\n<p>There is sufficient free space on the page containing the old row for the updated row.</p>\n</li>\n</ul>\n</div>\n<p>In such cases, heap-only tuples provide two optimizations:</p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\">\n<li class=\"listitem\">\n<p>New index entries are not needed to represent updated rows, however, summary indexes may still need to be updated.</p>\n</li>\n<li class=\"listitem\">\n<p>When a row is updated multiple times, row versions other than the oldest and the newest can be completely removed during normal operation, including <code class=\"command\">SELECT</code>s, instead of requiring periodic vacuum operations. (Indexes always refer to the <a class=\"link\" href=\"/docs/18/storage-page-layout.html\" title=\"66.6.\u00a0Database Page Layout\">page item identifier</a> of the original row version. The tuple data associated with that row version is removed, and its item identifier is converted to a redirect that points to the oldest version that may still be visible to some concurrent transaction. Intermediate row versions that are no longer visible to anyone are completely removed, and the associated page item identifiers are made available for reuse.)</p>\n</li>\n</ul>\n</div>\n<p>You can increase the likelihood of sufficient page space for HOT updates by decreasing a table's <a class=\"link\" href=\"/docs/18/sql-createtable.html#RELOPTION-FILLFACTOR\"><code class=\"literal\">fillfactor</code></a>. If you don't, HOT updates will still happen because new rows will naturally migrate to new pages and existing pages with sufficient free space for new row versions. The system view <a class=\"link\" href=\"/docs/18/monitoring-stats.html#MONITORING-PG-STAT-ALL-TABLES-VIEW\" title=\"27.2.19.\u00a0pg_stat_all_tables\">pg_stat_all_tables</a> allows monitoring of the occurrence of HOT and non-HOT updates.</p>\n</div>", "manual_path": "/docs/18/storage-hot.html", "comparison_data": {"layouts": []}, "comparison_hash": "27341929154bfb55531f03501322b65af719c5561f3c4ddc9528a14aa4df69b5"}, "comparison": {"left": "17", "right": "18", "status": "unchanged", "diff": ""}}