Limited beta · What is this?

pgTrue is under active development: reports may contain significant mistakes, inaccuracies, or bugs. Please report anything you find to pgtrue@postgres.ai.

pgTrue is an independent fact-check of technical Postgres articles. Read the questions and answers.

pgTrue fact-check

ElephantSeal A-Limited coverage

Embed

The ElephantSeal always shows this report's latest edition and links here. Copies cached elsewhere may update later.

[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa.svg?v=13&theme=light)](https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa)
<a href="https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa"><img src="https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa.svg?v=13&amp;theme=light" alt="pgTrue fact-check" width="90" height="20" loading="lazy" decoding="async" style="display:inline-block;width:90px;height:20px"></a>
https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa.svg?v=13&theme=light
.. image:: https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa.svg?v=13&theme=light
   :target: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa
   :alt: pgTrue fact-check
   :width: 90
   :height: 20
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa.svg?v=13&theme=dark)](https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa)
<a href="https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa"><img src="https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa.svg?v=13&amp;theme=dark" alt="pgTrue fact-check" width="90" height="20" loading="lazy" decoding="async" style="display:inline-block;width:90px;height:20px"></a>
https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa.svg?v=13&theme=dark
.. image:: https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa.svg?v=13&theme=dark
   :target: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa
   :alt: pgTrue fact-check
   :width: 90
   :height: 20
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa.svg?v=13)](https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa)
<a href="https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa"><img src="https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa.svg?v=13" alt="pgTrue fact-check" width="90" height="20" loading="lazy" decoding="async" style="display:inline-block;width:90px;height:20px"></a>
https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa.svg?v=13
.. image:: https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa.svg?v=13
   :target: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa
   :alt: pgTrue fact-check
   :width: 90
   :height: 20
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/radar.svg?v=13&theme=light)](https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa)
<a href="https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa"><img src="https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/radar.svg?v=13&amp;theme=light" alt="pgTrue fact-check" width="240" height="240" loading="lazy" decoding="async" style="display:inline-block;width:240px;height:240px"></a>
https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/radar.svg?v=13&theme=light
.. image:: https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/radar.svg?v=13&theme=light
   :target: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa
   :alt: pgTrue fact-check
   :width: 240
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/radar.svg?v=13&theme=dark)](https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa)
<a href="https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa"><img src="https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/radar.svg?v=13&amp;theme=dark" alt="pgTrue fact-check" width="240" height="240" loading="lazy" decoding="async" style="display:inline-block;width:240px;height:240px"></a>
https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/radar.svg?v=13&theme=dark
.. image:: https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/radar.svg?v=13&theme=dark
   :target: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa
   :alt: pgTrue fact-check
   :width: 240
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/radar.svg?v=13)](https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa)
<a href="https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa"><img src="https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/radar.svg?v=13" alt="pgTrue fact-check" width="240" height="240" loading="lazy" decoding="async" style="display:inline-block;width:240px;height:240px"></a>
https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/radar.svg?v=13
.. image:: https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/radar.svg?v=13
   :target: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa
   :alt: pgTrue fact-check
   :width: 240
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/wide.svg?v=13&theme=light)](https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa)
<a href="https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa"><img src="https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/wide.svg?v=13&amp;theme=light" alt="pgTrue fact-check" width="480" height="240" loading="lazy" decoding="async" style="display:inline-block;width:480px;height:240px"></a>
https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/wide.svg?v=13&theme=light
.. image:: https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/wide.svg?v=13&theme=light
   :target: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa
   :alt: pgTrue fact-check
   :width: 480
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/wide.svg?v=13&theme=dark)](https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa)
<a href="https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa"><img src="https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/wide.svg?v=13&amp;theme=dark" alt="pgTrue fact-check" width="480" height="240" loading="lazy" decoding="async" style="display:inline-block;width:480px;height:240px"></a>
https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/wide.svg?v=13&theme=dark
.. image:: https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/wide.svg?v=13&theme=dark
   :target: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa
   :alt: pgTrue fact-check
   :width: 480
   :height: 240
[![pgTrue fact-check](https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/wide.svg?v=13)](https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa)
<a href="https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa"><img src="https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/wide.svg?v=13" alt="pgTrue fact-check" width="480" height="240" loading="lazy" decoding="async" style="display:inline-block;width:480px;height:240px"></a>
https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/wide.svg?v=13
.. image:: https://pgtrue.postgres.ai/badge/85d9c881-2326-4d70-99bb-9c1229ca6cfa/wide.svg?v=13
   :target: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa
   :alt: pgTrue fact-check
   :width: 480
   :height: 240

Click the snippet to select all of it, then copy. Where SVG is stripped, as in some email clients and feed readers, change .svg to .png. PNG uses the light theme for Auto. For Markdown PNG embeds, use the HTML snippet where supported to preserve the display size.

Optional colours: append &color=26798E or &labelColor=333C47 after a theme query (use ? for the first parameter). Use 3- or 6-digit hex.

For pages with a light background.

For pages with a dark background. The ElephantSeal gets a thin edge so it does not blend in.

Auto follows the reader's light or dark setting where the host supports it, and shows the light ElephantSeal where it does not.

On a light page
On a dark page

PostgreSQL Tuning: Database Indexes (opens in new tab)

tigerdata.com
Check before you follow it: 2 claims are wrong.
1
inaccuracy
0
dangerous-recipe
1
misleading
1
imprecise
1
transcription
0
aged
0
withdrawn
8
verified-accurate

Factual B+ · Applicable B+ · Consistent A · Transparent A · Safe A

ReportTechnical fact-check, edition 3 Issued EditionUpdated after review. Corrections are listed below. SubmittedSubmitted by the PostgresAI team. Author responseNo written reply from the author. We re-audited this article 1 time; see Revisions below. Policy: right-of-reply and corrections policy. pgTrue versionaudited with v1.0.14 (approx.) · regraded with v1.1.0 (approx.)

Inaccuracies

F13

Inaccuracy: “…indexes on the referenced columns, making operations like cascading updates or deletes…”

INACCURATEFactual · holds up after review

Claim ledger

Article says
…indexes on the referenced columns, making operations like cascading updates or deletes faster.
What is true
Referenced keys already have supporting indexes. Cascades search the referencing table. PostgreSQL 16.2 documents indexing referencing columns at doc/src/sgml/ddl.sgml:1187-1190. Adding another referenced-key index does not address that scan.
So what
Index the child table's referencing foreign-key columns when optimizing cascaded updates or deletes.

Source

Source · REL_16_2 · doc/src/sgml/ddl.sgml:1182-1194the referencing table for rows matching the old value, it is often a good idea to index the referencing columns too. Because this is not always
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…indexes on the referenced columns, making operations like cascading updates or deletes faster.
All sources and excerpts · 3
Evidence the referencing table for rows matching the old value, it is often a good idea to index the referencing columns too. Because this is not always

Version note: REL_18_6 ddl.sgml:1389-1402 retains this distinction.

Evidence <command>DELETE</command> of a row from the referenced table or an <command>UPDATE</command> of a referenced column will require a scan of the referencing table for rows matching the old value, it is often a good idea to index the referencing columns too.
Evidence <command>DELETE</command> of a row from the referenced table or an <command>UPDATE</command> of a referenced column will require a scan of the referencing table for rows matching the old value, it is often a good idea to index the referencing columns too.

Version note: PostgreSQL 16.2 predates the article's March 6, 2024 publication.

How the review tested this

Review: We tested whether foreign-key existence checks rescue the cascade claim. Both releases locate the cascade search in the referencing table. The prescribed index placement and wasted-work consequence are concrete. We tested whether the sentence concerns existence checks alone. E-34 explicitly attributes faster cascades to referenced-column indexes. E-36 identifies the referencing-table search instead.

Dangerous or recipe bugsNone in this edition.

Misleading / imprecise

F3

Misleading: “…After adding or removing an index, update statistics using the `ANALYZE` command on the…”

MISLEADINGApplicable · holds up after review

Claim ledger

Article says
…After adding or removing an index, update statistics using the `ANALYZE` command on the affected table.
What is true
New non-expression indexes immediately use existing column statistics. REL_16_2 doc/src/sgml/ref/create_index.sgml:783-789 distinguishes expression indexes, which need their own statistics. Adding or removing an ordinary index does not itself change column distributions. The blanket recommendation adds unnecessary ANALYZE work.
So what
Run ANALYZE for new expression indexes or stale table statistics, rather than after every ordinary index addition or removal.

Source

Source · REL_16_2 · doc/src/sgml/ref/create_index.sgml:783-791columns. Newly-created non-expression indexes can immediately use these statistics to determine an index's usefulness.
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…After adding or removing an index, update statistics using the `ANALYZE` command on the affected table.
All sources and excerpts · 2
Evidence columns. Newly-created non-expression indexes can immediately use these statistics to determine an index's usefulness.

Version note: Publication-era PostgreSQL 16.2.

Evidence columns. Newly-created non-expression indexes can immediately use these statistics to determine an index's usefulness.
How the review tested this

Review: We tested whether expression indexes justify the recommendation. Both versions explicitly distinguish expression indexes from ordinary indexes that immediately use existing statistics. The blanket instruction remains misleading. We tested expression indexes as an exception. E-18 explicitly distinguishes them from ordinary indexes. That exception does not support ANALYZE after every index addition or removal.

F2

Imprecise: “…instead of a single transaction for the entire hypertable…”

IMPRECISETransparent · holds up after review

Claim ledger

Article says
…instead of a single transaction for the entire hypertable…
What is true
Ordinary CREATE INDEX uses one transaction across chunks. TimescaleDB 2.30.2 src/process_utility.c:3925-3926 selects that branch unless multitransaction mode is enabled. The linked documentation supplies WITH (timescaledb.transaction_per_chunk). Omitting it gives a different concurrency profile.
So what
Specify WITH (timescaledb.transaction_per_chunk) when separate chunk transactions are intended.

Source

Source · timescaledb@2.14.2 · src/process_utility.c:2742-2764/* create chunk indexes using the same transaction for all the chunks */ if (!info.extended_options.multitransaction)
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…instead of a single transaction for the entire hypertable…
All sources and excerpts · 3
Evidence /* create chunk indexes using the same transaction for all the chunks */ if (!info.extended_options.multitransaction)

Version note: Historical comparison with TimescaleDB 2.14.2.

Evidence /* create chunk indexes using the same transaction for all the chunks */ if (!info.extended_options.multitransaction)
EvidenceCREATE INDEX ... WITH (timescaledb.transaction_per_chunk, ...);
How the review tested this

Review: We tested the linked-documentation reading. Both source versions retain a single-transaction branch. The linked syntax requires the omitted transaction_per_chunk option. We checked whether the linked documentation supplies the missing condition. E-17 does, but the article omits the option. Both source versions retain the single-transaction branch.

Transcription slips

F4

Transcription slip: “…where product_available = ‘true’…”

MISTRANSCRIBEDFactual · holds up after review

Claim ledger

Article says
…where product_available = ‘true’…
What is true
SQL strings use ASCII single quotes. REL_16_2 doc/src/sgml/syntax.sgml:306-311 defines that delimiter. The characters surrounding true are curly quotes. PostgreSQL does not interpret them as string delimiters.
So what
Replace the predicate with WHERE product_available = true for a boolean column.

Source

Source · REL_16_2 · doc/src/sgml/syntax.sgml:306-311A string constant in SQL is an arbitrary sequence of characters bounded by single quotes (<literal>'</literal>), for example
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…where product_available = ‘true’…
All sources and excerpts · 1
Evidence A string constant in SQL is an arbitrary sequence of characters bounded by single quotes (<literal>'</literal>), for example

Version note: The same syntax appears in REL_18_6.

How the review tested this

Review: We checked typography as an explanation. The displayed predicate contains curly quotes. Publication-era SQL documentation specifies ASCII single quotes. The transcription classification fits. We checked whether typography explains the characters. It explains their appearance but does not make them SQL string delimiters. The transcription classification fits.

Verified accurate

F8

Verified accurate: “`random_page_cost` is often too high, which causes the planner to avoid index scans…”

ACCURATEFactual · holds up after review

Claim ledger

Article says
`random_page_cost` is often too high, which causes the planner to avoid index scans…
What is true
random_page_cost affects estimated random-page I/O during planning. Raising it relative to seq_page_cost makes index scans more expensive. REL_18_6 src/backend/optimizer/path/costsize.c:741 multiplies fetched pages by the random-page cost.

Source

Source · REL_18_6 · doc/src/sgml/config.sgml:6006-6064Reducing this value relative to <varname>seq_page_cost</varname> will cause the system to prefer index scans; raising it will make index scans look relatively more expensive. You can raise
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)`random_page_cost` is often too high, which causes the planner to avoid index scans…
All sources and excerpts · 2
Evidence Reducing this value relative to <varname>seq_page_cost</varname> will cause the system to prefer index scans; raising it will make index scans look relatively more expensive. You can raise
Evidence max_IO_cost = pages_fetched * spc_random_page_cost;
How the review tested this

Review: We checked relative costs and the word often. The finding verifies only the direction of the planning effect. It does not endorse the unsupported frequency assertion. We tested whether the source establishes that random_page_cost is often excessive. It does not. The finding expressly limits verification to the direction of the planning effect.

F9

Verified accurate: “`random_page_cost and seq_page_cost`may not be set accurately according to your resources.”

ACCURATEFactual · holds up after review

Claim ledger

Article says
`random_page_cost and seq_page_cost`may not be set accurately according to your resources.
What is true
seq_page_cost estimates sequential page-fetch cost during planning. REL_18_6 src/backend/optimizer/path/costsize.c:323 multiplies the table's page count by its tablespace-adjusted value. The article correctly identifies it as a possible source of scan-cost misestimation.

Source

Source · REL_18_6 · doc/src/sgml/config.sgml:5989-6004Sets the planner's estimate of the cost of a disk page fetch that is part of a series of sequential fetches. The default is 1.0.
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)`random_page_cost and seq_page_cost`may not be set accurately according to your resources.
All sources and excerpts · 2
Evidence Sets the planner's estimate of the cost of a disk page fetch that is part of a series of sequential fetches. The default is 1.0.
Evidence disk_run_cost = spc_seq_page_cost * baserel->pages;
How the review tested this

Review: We checked tablespace overrides and whether the parameter measures actual I/O. The finding correctly describes a planning estimate and its tablespace-adjusted use. We checked whether seq_page_cost measures actual runtime rather than a planning estimate. E-28 defines an estimate. E-29 confirms its sequential-scan cost calculation.

F10

Verified accurate: “Setting a higher value of `maintenance_work_mem` can substantially speed up the index…”

ACCURATEFactual · holds up after review

Claim ledger

Article says
Setting a higher value of `maintenance_work_mem` can substantially speed up the index creation process…
What is true
Index creation uses maintenance_work_mem for maintenance sorting. REL_18_6 src/backend/access/nbtree/nbtsort.c:430-433 passes it to the B-tree tuplesort. More memory can reduce external sorting when memory limits constrain the build.

Source

Source · REL_18_6 · doc/src/sgml/config.sgml:1999-2027Specifies the maximum amount of memory to be used by maintenance operations, such as <command>VACUUM</command>, <command>CREATE INDEX</command>, and <command>ALTER TABLE ADD FOREIGN KEY</command>.
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)Setting a higher value of `maintenance_work_mem` can substantially speed up the index creation process…
All sources and excerpts · 2
Evidence Specifies the maximum amount of memory to be used by maintenance operations, such as <command>VACUUM</command>, <command>CREATE INDEX</command>, and <command>ALTER TABLE ADD FOREIGN KEY</command>.
Evidence buildstate->spool->sortstate = tuplesort_begin_index_btree(heap, index, buildstate->isunique, buildstate->nulls_not_distinct, maintenance_work_mem, coordinate, TUPLESORT_NONE);
How the review tested this

Review: We tested an unconditional speedup reading. The article says can, and the finding restricts improvement to memory-constrained builds. B-tree sorting receives maintenance_work_mem. We tested whether the finding promises improvement for every build. It preserves the article's conditional wording. E-31 confirms that B-tree sorting consumes maintenance_work_mem.

F11

Verified accurate: “…Postgres can employ an `INDEX ONLY` scan and never have to touch the table.”

ACCURATEFactual · holds up after review

Claim ledger

Article says
…Postgres can employ an `INDEX ONLY` scan and never have to touch the table.
What is true
An index-only scan can return covered data without visiting the heap when the corresponding visibility-map bit is set. REL_18_6 doc/src/sgml/indices.sgml:1217-1219 describes that condition. The article's sometimes qualification preserves this reading.

Source

Source · REL_18_6 · doc/src/sgml/indices.sgml:1209-1233visibility map bit for the corresponding heap page. If it's set, the row is known visible and so the data can be returned with no further work.
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…Postgres can employ an `INDEX ONLY` scan and never have to touch the table.
All sources and excerpts · 1
Evidence visibility map bit for the corresponding heap page. If it's set, the row is known visible and so the data can be returned with no further work.
How the review tested this

Review: We checked the visibility-map requirement against the surrounding sometimes qualification. The finding preserves that condition. It does not claim that coverage always eliminates heap access. We tested the visibility-map requirement against the article's sometimes qualification. E-32 supports avoiding heap access when the bit is set. The conditional claim stands.

F14

PostgreSQL supports the listed index access methods

ACCURATEFactual · holds up after review

Claim ledger

Article says
…hash, GIN, GiST, or BRIN.
What is true
PostgreSQL 18 section 11.2 lists Hash, GIN, GiST, and BRIN alongside B-tree and SP-GiST.
Charitable reading
The list names supported examples rather than claiming an exhaustive taxonomy.

Source

Source · https://www.postgresql.org/docs/current/indexes-types.html?ref=tigerdata.comPostgreSQL provides several index types: B-tree, Hash, GiST, SP-GiST, GIN, BRIN, and the extension bloom .
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…hash, GIN, GiST, or BRIN.
All sources and excerpts · 1
EvidencePostgreSQL provides several index types: B-tree, Hash, GiST, SP-GiST, GIN, BRIN, and the extension bloom .
How the review tested this

Review: We tested whether the list claims completeness. It gives examples. The recorded PostgreSQL documentation includes every named access method. We tested whether the list claims completeness. It presents examples. E-40 includes all four named access methods.

F15

B-tree supports the listed comparisons and null tests

ACCURATEFactual · holds up after review

Claim ledger

Article says
…Supports <, <=, =, >=, >, BETWEEN, IN, IS NULL, IS NOT NULL.
What is true
PostgreSQL 18 section 11.2.1 confirms B-tree support for the listed comparisons, BETWEEN, IN, IS NULL, and IS NOT NULL.
Charitable reading
Support means an eligible access path. It does not guarantee planner selection.

Source

Source · https://www.postgresql.org/docs/current/indexes-types.html?ref=tigerdata.com< <= = >= > Constructs equivalent to combinations of these operators, such as BETWEEN and IN , can also be implemented with a B-tree index search. Also, an IS NULL or IS NOT NULL condition on an index column can be used with a B-tree index.
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…Supports <, <=, =, >=, >, BETWEEN, IN, IS NULL, IS NOT NULL.
All sources and excerpts · 1
Evidence< <= = >= > Constructs equivalent to combinations of these operators, such as BETWEEN and IN , can also be implemented with a B-tree index search. Also, an IS NULL or IS NOT NULL condition on an index column can be used with a B-tree index.
How the review tested this

Review: We distinguished eligible index operations from guaranteed planner selection. The finding claims support only. E-42 explicitly lists the comparisons and null tests. We tested support against guaranteed planner selection. The finding claims eligibility only. E-42 confirms every listed comparison and null test.

F16

Hash indexes do not provide range or ordered access

ACCURATEFactual · holds up after review

Claim ledger

Article says
…Doesn't support range queries or sorting.
What is true
PostgreSQL 18 section 11.2.2 limits hash indexes to equality comparisons. Hash indexes cannot supply range searches or ordered retrieval.
Charitable reading
Sorting refers to retrieving ordered results through the index.

Source

Source · https://www.postgresql.org/docs/current/indexes-types.html?ref=tigerdata.comHence, such indexes can only handle simple equality comparisons.
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…Doesn't support range queries or sorting.
All sources and excerpts · 1
EvidenceHence, such indexes can only handle simple equality comparisons.
How the review tested this

Review: We tested whether sorting means a separate query operation. The finding concerns ordered retrieval through the index. The documentation limits hash index searches to equality. We tested sorting as a separate query operation. The claim concerns access supplied by the index. E-44 limits hash index searches to equality.

F17

GiST supports built-in geometric data types

ACCURATEFactual · holds up after review

Claim ledger

Article says
…supports indexing of complex data types such as geometric shapes…
What is true
PostgreSQL 18 section 11.2.3 documents GiST operator classes for several two-dimensional geometric types.
Charitable reading
GiST support depends on an operator class for the indexed type.

Source

Source · https://www.postgresql.org/docs/current/indexes-types.html?ref=tigerdata.comthe standard distribution of PostgreSQL includes GiST operator classes for several two-dimensional geometric data types
In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…supports indexing of complex data types such as geometric shapes…
All sources and excerpts · 1
Evidencethe standard distribution of PostgreSQL includes GiST operator classes for several two-dimensional geometric data types
How the review tested this

Review: We checked whether the finding endorses adjacent natural-language claims. It verifies geometric types only. E-46 explicitly documents the required GiST operator classes. We tested whether verification extends to every complex type or natural-language processing. It covers geometric operator classes only. E-46 directly supports that limited claim.

Notes

5 not graded: findings no reader would act on differently
F1

Note: “By running `EXPLAIN ANALYZE` before executing a query…”

NOTEpartly holds after review

Claim ledger

Article says
By running `EXPLAIN ANALYZE` before executing a query…
What is true
EXPLAIN ANALYZE executes the query, as REL_16_2 doc/src/sgml/ref/explain.sgml:91-92 states. EXPLAIN alone inspects the plan without execution. The article's timing example fits execution, but its phrase about inspecting before execution is ambiguous.
So what
Use EXPLAIN to inspect a plan without executing the query. Use EXPLAIN ANALYZE when execution is intended.

Source

Source · REL_16_2 · doc/src/sgml/ref/explain.sgml:91-101Keep in mind that the statement is actually executed when the <literal>ANALYZE</literal> option is used. Although

Not graded: no reader would act differently on it.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)By running `EXPLAIN ANALYZE` before executing a query…
All sources and excerpts · 4
Evidence Keep in mind that the statement is actually executed when the <literal>ANALYZE</literal> option is used. Although

Version note: Publication-era PostgreSQL 16.2.

Evidence /* run the plan */ ExecutorRun(queryDesc, dir, 0);
Evidence Keep in mind that the statement is actually executed when the <literal>ANALYZE</literal> option is used.
Evidence Keep in mind that the statement is actually executed when the <literal>ANALYZE</literal> option is used.

Version note: PostgreSQL 16.2 predates the article's March 6, 2024 publication.

How the review tested this

Review: EXPLAIN ANALYZE executes the query. However, the article discusses execution timings and never instructs a second execution. Benchmarking before application execution remains a charitable reading. The asserted repeated work is hypothetical. We tested the reading that benchmarking precedes production execution. E-13 and E-14 still establish that EXPLAIN ANALYZE executes immediately. The wasted-work consequence remains proportionate.

F5

Note: “…can make in-place row modifications…”

NOTEholds up after review

Claim ledger

Article says
…can make in-place row modifications…
What is true
HOT does not overwrite the existing row version. REL_16_2 src/backend/access/heap/heapam.c:3783 inserts a new tuple. HOT needs space on the old tuple's page. The article correctly describes its ability to avoid ordinary index changes.

Source

Source · REL_16_2 · src/backend/access/heap/heapam.c:3766-3784RelationPutHeapTuple(relation, newbuf, heaptup, false); /* insert new tuple */

Not graded: no reader would act differently on it.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…can make in-place row modifications…
All sources and excerpts · 2
Evidence RelationPutHeapTuple(relation, newbuf, heaptup, false); /* insert new tuple */

Version note: The same insertion appears at REL_18_6 heapam.c:4253.

Evidence There is sufficient free space on the page containing the old row for the updated row.
How the review tested this

Review: We tested whether in-place means the same heap page. That reading is reasonable. The finding already preserves it as an ungraded terminology note. The code inserts a new tuple. We tested whether in-place means remaining on one heap page. That reading preserves the practical explanation. E-21 confirms a new tuple, so the terminology note stands.

F6

Note: “…indexes on the referenced columns…”

NOTEpartly holds after review

Claim ledger

Article says
…indexes on the referenced columns…
What is true
Referenced-column indexes support foreign-key existence checks. REL_16_2 doc/src/sgml/ddl.sgml:1183-1193 distinguishes these from referencing-column indexes that accelerate cascade searches. F13 covers the article's incorrect cascade attribution.
So what
Index the referencing foreign-key columns when cascade searches require acceleration.

Source

Source · REL_16_2 · doc/src/sgml/ddl.sgml:1182-1194the referencing table for rows matching the old value, it is often a good idea to index the referencing columns too. Because this is not always

Not graded: no reader would act differently on it.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…indexes on the referenced columns…
All sources and excerpts · 1
Evidence the referencing table for rows matching the old value, it is often a good idea to index the referencing columns too. Because this is not always

Version note: REL_18_6 ddl.sgml:1389-1402 retains this distinction.

How the review tested this

Review: E-23 confirms that referenced-column indexes support foreign-key lookups. The erroneous cascade attribution appears in the fuller quotation charged by F13. F6 adds no distinct graded defect. E-23 confirms that referenced-column indexes support existence checks. The cascade error is the same charge filed as F13. A second graded charge counts one defect twice.

F7

Note: “…it has to be updated every time a row is inserted, updated, or deleted.”

NOTEpartly holds after review

Claim ledger

Article says
…it has to be updated every time a row is inserted, updated, or deleted.
What is true
DELETE leaves index tuples for later cleanup. REL_16_2 src/backend/executor/nodeModifyTable.c:1655-1657 assigns that work to VACUUM because other transactions can still see the tuple. The article's write-cost explanation does not distinguish immediate changes from deferred maintenance.
So what
Keep autovacuum enabled and use VACUUM after bulk DELETE when prompt index cleanup is required.

Source

Source · REL_16_2 · src/backend/executor/nodeModifyTable.c:1651-1660* take care of it later. We can't delete index tuples immediately * anyway, since the tuple is still visible to other transactions.

Not graded: no reader would act differently on it.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…it has to be updated every time a row is inserted, updated, or deleted.
All sources and excerpts · 2
Evidence * take care of it later. We can't delete index tuples immediately * anyway, since the tuple is still visible to other transactions.

Version note: Publication-era PostgreSQL 16.2.

Evidence * take care of it later. We can't delete index tuples immediately * anyway, since the tuple is still visible to other transactions.
How the review tested this

Review: We tested deferred maintenance as the intended meaning. DELETE leaves index tuples for cleanup, but the article also recommends VACUUM. The evidence establishes timing, not wasted work from following this wording. We tested whether the article describes eventual maintenance. Its timing remains wrong. However, the article already recommends VACUUM. The evidence does not establish wasted work from the stated maintenance decision.

F12

Note: “…requires an exclusive table lock…”

NOTEpartly holds after review

Claim ledger

Article says
…requires an exclusive table lock…
What is true
Ordinary REINDEX blocks table writes and takes ACCESS EXCLUSIVE on the index. REL_18_6 doc/src/sgml/ref/reindex.sgml:278-285 explains that index locking also blocks most queries. The article's recommendation to use concurrent rebuilding remains useful.

Source

Source · REL_18_6 · doc/src/sgml/ref/reindex.sgml:275-286considerations are rather different. <command>REINDEX</command> locks out writes but not reads of the index's parent table. It also takes an <literal>ACCESS EXCLUSIVE</literal> lock on the specific index being processed,

Not graded: no reader would act differently on it.

In the article

In the article

Article · exact quote · open in article ↗ (opens in new tab)…requires an exclusive table lock…
All sources and excerpts · 1
Evidence considerations are rather different. <command>REINDEX</command> locks out writes but not reads of the index's parent table. It also takes an <literal>ACCESS EXCLUSIVE</literal> lock on the specific index being processed,
How the review tested this

Review: E-33 names ACCESS EXCLUSIVE for the index and describes table write blocking. It does not name SHARE for the table. The note should retain the documented effects without attributing that lock mode to this range. We tested the colloquial reading of exclusive as blocking writes. E-33 distinguishes table and index locking. The finding preserves the useful concurrency recommendation and assigns only a note.

More in this report

Section checks · 12 sections

Section checks

AspectGradeFindingsCoverage
Index basicsA1 verified-accurate100% of claims (6 of 6)
Index benefitsB+1 inaccuracy75% of claims (9 of 12)
Write efficiencyAnone46% of claims (7 of 15)provisional
Index typesA1 verified-accurate100% of claims (1 of 1)
B-tree indexesA1 verified-accurate100% of claims (4 of 4)
Hash indexesA1 verified-accurate100% of claims (4 of 4, plus 1 that need data we do not have)
Partial indexesA1 transcription100% of claims (3 of 3)
GiST and SP-GiSTA1 verified-accurate66% of claims (10 of 15, plus 2 that need data we do not have)
EXPLAIN ANALYZEAnone83% of claims (5 of 6)
Sequential-scan diagnosisA2 verified-accurate55% of claims (5 of 9, plus 4 that need data we do not have)provisional
Indexing recommendationsB+1 misleading · 1 verified-accurate55% of claims (11 of 20, plus 2 that need data we do not have)provisional
Partitioned tables and hypertablesA1 imprecise60% of claims (15 of 25, plus 3 that need data we do not have)
Coverage and assessment · Checked 110 of 167 Postgres claims across 21 sections; 3 sections below half

A- — the findings address the article's main subject. What we did not check is listed below. We checked PostgreSQL index selection, scan costs, maintenance, SQL examples, and chunk transaction behavior against source and documentation.

We did not check everything in this article. What we did not check is listed below, in the words we recorded at the time. None of it moved the letter. We never charge our own limits to the article.

What we did not check

  • We did not reproduce the million-row query timings.
  • We did not verify the corruption scenarios or the claim that hash indexes particularly favor integers.
  • We did not finish checking string storage details and every GiST and SP-GiST definition.
  • We could not determine what the recommendation to write queries with char means.
  • We did not reproduce the customers query or its displayed timings.
  • We did not check HOT behavior, index-only scan requirements, REINDEX locks, or statistics requirements after index changes.
  • We did not verify all hypertable claims against the implementation.
  • We did not establish the claimed performance advantage from retention policies and continuous aggregates.
  • We did not reach the author's profile or the linked database-sizing article.
  • We did not establish version history for every checked index feature.
  • We did not verify the claimed typical index-to-table storage ratio for small datasets.
  • We did not reproduce the example's planner estimates or execution timings.
  • Section “Write efficiency”: we checked 7 of 15 checkable claims.
  • Section “Sequential-scan diagnosis”: we checked 5 of 13 checkable claims.
  • Section “Indexing recommendations”: we checked 11 of 22 checkable claims.
  • Section “Introduction”: we checked 1 of 2 checkable claims.
  • Section “Index costs”: we checked 0 of 3 checkable claims.
  • Section “Index storage”: we checked 6 of 18 checkable claims.
  • We could not decide whether the article depends on finding F13.
Checked 110 of 167 Postgres claims across 21 sections; 3 sections below half
  • Introduction: 1 of 2 Postgres claims checked; not counted: 1 product or opinion, 9 not a claim; not checked: 1 for other reasons
  • Index basics: 6 of 6 Postgres claims checked; not counted: 3 not a claim
  • Index benefits: 9 of 12 Postgres claims checked; not counted: 1 product or opinion, 2 duplicate, 2 not a claim; not checked: 3 for other reasons
  • Index costs: 0 of 2 Postgres claims checked, plus 1 that need data we do not have; not counted: 1 product or opinion, 1 not a claim; not checked: 2 for other reasons
  • Index storage: 6 of 17 Postgres claims checked, plus 1 that need data we do not have; not counted: 1 product or opinion, 1 not a claim; not checked: 11 for other reasons
  • Write efficiency: 7 of 15 Postgres claims checked; not counted: 3 duplicate, 1 not a claim; not checked: 8 for other reasons
  • Index types: 1 of 1 Postgres claims checked; not counted: 2 not a claim
  • B-tree indexes: 4 of 4 Postgres claims checked; not counted: 1 duplicate, 1 not a claim
  • Hash indexes: 4 of 4 Postgres claims checked, plus 1 that need data we do not have; not counted: 1 not a claim
  • Composite indexes: 3 of 3 Postgres claims checked; not counted: 1 not a claim
  • Partial indexes: 3 of 3 Postgres claims checked; not counted: 1 not a claim
  • Covering indexes: 2 of 3 Postgres claims checked; not counted: 1 not a claim; not checked: 1 for other reasons
  • BRIN indexes: 4 of 5 Postgres claims checked; not counted: 1 not a claim; not checked: 1 for other reasons
  • GiST and SP-GiST: 10 of 15 Postgres claims checked, plus 2 that need data we do not have; not counted: 1 not a claim; not checked: 5 for other reasons
  • EXPLAIN ANALYZE: 5 of 6 Postgres claims checked; not counted: 1 product or opinion, 2 not a claim; not checked: 1 for other reasons
  • Sequential-scan example: 9 of 9 Postgres claims checked, plus 4 that need data we do not have; not counted: 1 product or opinion, 4 duplicate, 3 not a claim
  • Sequential-scan diagnosis: 5 of 9 Postgres claims checked, plus 4 that need data we do not have; not checked: 4 for other reasons
  • VACUUM and ANALYZE: 5 of 6 Postgres claims checked, plus 1 that need data we do not have; not counted: 1 product or opinion, 2 duplicate, 1 not a claim; not checked: 1 for other reasons
  • Indexing recommendations: 11 of 20 Postgres claims checked, plus 2 that need data we do not have; not counted: 4 product or opinion, 2 duplicate, 3 not a claim; not checked: 9 for other reasons
  • Partitioned tables and hypertables: 15 of 25 Postgres claims checked, plus 3 that need data we do not have; not counted: 1 product or opinion, 2 duplicate, 2 not a claim; not checked: 10 for other reasons
  • Conclusion: no checkable claims; not counted: 1 product or opinion, 2 duplicate, 2 not a claim

Average of 5 axes: 3.72 · result A-

Some explanatory text is not shown in this edition; the grade and findings are complete.

Scorecard · the five axes
FACTS scorecard Scorecard radar, 5 axes, bigger is better. Overall A-. Factual B+ · 1 wrong of 12 checked · 1 caveat. Applicable B+ · 1 wrong of 7 checked · 0 caveats. Consistent A · 0 wrong of 12 checked · 0 caveats. Transparent A · 0 wrong of 6 checked · 1 caveat. Safe A · 0 wrong of 11 checked · 0 caveats. B+ 1 wrong of 12 checked · 1 caveatFactual B+1 wrong of 121 caveat B+ 1 wrong of 7 checked · 0 caveatsApplicable B+1 wrong of 70 caveats A 0 wrong of 12 checked · 0 caveatsConsistent A0 wrong of 120 caveats A 0 wrong of 6 checked · 1 caveatTransparent A0 wrong of 61 caveat A 0 wrong of 11 checked · 0 caveatsSafe A0 wrong of 110 caveats

By topic: Index basics — 1 finding, 0 wrong · Index benefits — 1 finding, 1 wrong · Index types — 1 finding, 0 wrong · B-tree indexes — 1 finding, 0 wrong · Hash indexes — 1 finding, 0 wrong · Partial indexes — 1 finding, 0 wrong · GiST and SP-GiST — 1 finding, 0 wrong · Sequential-scan diagnosis — 2 findings, 0 wrong · Indexing recommendations — 2 findings, 1 wrong · Partitioned tables and hypertables — 1 finding, 0 wrong

Further out is better. Each axis has its own letter, from the wrong claims and caveats among the claims we checked of that kind.

Checked on the FACTS: Factual, Applicable, Consistent, Transparent, Safe. Clockwise: Factual (is it true?), Applicable (does it apply to my setup, today?), Consistent (does it agree with itself?), Transparent (can I check it myself?), Safe (can I run this on prod?).

We checked 12 claims.

AxisLetterWrongCaveatsCheckedCoverage
FactualB+1112assessed: B+ · 1 wrong of 12 checked · 1 caveat
ApplicableB+107assessed: B+ · 1 wrong of 7 checked · 0 caveats
ConsistentA0012assessed: A · 0 wrong of 12 checked · 0 caveats
TransparentA016assessed: A · 0 wrong of 6 checked · 1 caveat
SafeA0011assessed: A · 0 wrong of 11 checked · 0 caveats
Topics · 12 topics

Topics

TopicFactualApplicableConsistentTransparentSafe
Index basics0 issues 1 checked F110 issues 1 checked0 issues 1 checked
Index benefits1 issue 1 checked F130 issues 1 checked0 issues 1 checked
Write efficiency
Index types0 issues 1 checked F140 issues 1 checked0 issues 1 checked
B-tree indexes0 issues 1 checked F150 issues 1 checked0 issues 1 checked
Hash indexes0 issues 1 checked F160 issues 1 checked0 issues 1 checked
Partial indexes1 issue 1 checked F40 issues 1 checked
GiST and SP-GiST0 issues 1 checked F170 issues 1 checked0 issues 1 checked0 issues 1 checked
EXPLAIN ANALYZE
Sequential-scan diagnosis0 issues 2 checked F8 F90 issues 2 checked0 issues 2 checked
Indexing recommendations0 issues 2 checked F101 issue 2 checked F30 issues 2 checked
Partitioned tables and hypertables0 issues 1 checked0 issues 1 checked0 issues 1 checked1 issue 1 checked F2

Issues found among the claims checked, per topic and axis. Each link goes to the finding behind the count.

Revisions: 2 · A- -> A-

We audited this article 2 times. Each row is the final edition of one audit. Letters and findings of earlier revisions stay readable at their own address.

  1. Revision 1 · 2026-10-01 00:21 UTC · A- · audit version not recorded · regrade version not recorded

    Article as first submitted. 3 accurate · 3 wrong · 5 caveats.

    ElephantSeal: A-. Open: the production risk is not yet fixed or warned about.

    Changes: First audit. Open: F1 “EXPLAIN ANALYZE executes the query” (misleading); F2 “Cascade performance depends on indexes on referencing columns” (misleading); F5 “Ordinary new indexes can use existing column statistics” (misleading); F3 “HOT creates another tuple version” (mostly accurate); F4 “DELETE defers removal of index entries” (mostly accurate); F6 “Standard REINDEX takes SHARE on the table” (mostly accurate); F8 “…with indexes on the referenced columns, making operations like cascading updates or deletes faster.” (mostly accurate); F9 “…After adding or removing an index, update statistics using the `ANALYZE` command on the affected table.” (mostly accurate).

  2. Revision 2 · this page · 2026-10-19 07:41 UTC · A- · audited with v1.0.14 (approx.) · regraded with v1.1.0 (approx.)

    Same article text, re-audited. 8 accurate · 2 wrong · 2 caveats.

    ElephantSeal: A-.

    Changes: No longer reported: “EXPLAIN ANALYZE executes the query”; “Cascade performance depends on indexes on referencing columns”; “Ordinary new indexes can use existing column statistics”; “HOT creates another tuple version”; “DELETE defers removal of index entries”; “Standard REINDEX takes SHARE on the table”; “…with indexes on the referenced columns, making operations like cascading updates or deletes faster.”; “…After adding or removing an index, update statistics using the `ANALYZE` command on the affected table.”. New: F13 “…indexes on the referenced columns, making operations like cascading updates or deletes faster.” (false); F3 “…After adding or removing an index, update statistics using the `ANALYZE` command on the affected table.” (misleading); F2 “…instead of a single transaction for the entire hypertable…” (mostly accurate); F4 “…where product_available = ‘true’…” (misquoted).

Questions and answers

Questions and answers

What is pgTrue?

pgTrue is an independent fact-check of technical Postgres articles, made by PostgresAI. It helps you check advice before you use it.

What does the letter grade mean?

The letter grade summarizes the claims we checked. Five axes show what we checked:

  • Factual: is it true?
  • Applicable: does it apply to my setup, today?
  • Consistent: does it agree with itself?
  • Transparent: can I check it myself?
  • Safe: can I run this in production?

What is the ElephantSeal?

The ElephantSeal is the mark an article earns. It always shows the latest edition. “Open:” lists what is still open.

Can an author reply?

Authors can ask us to correct a finding, reply to it, or withdraw it. Right-of-reply policy.

Paste into your AI assistant to fix the article, then ask for a re-review.

Show the text
Fix the article with this report, then ask pgTrue for a re-review.

# pgTrue report: PostgreSQL Tuning: Database Indexes

Article title: PostgreSQL Tuning: Database Indexes
Article URL: https://www.tigerdata.com/learn/postgresql-performance-tuning-optimizing-database-indexes
Report URL: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa
Audited revision: 2 of 2, 2026-10-19 07:41:23 UTC
Overall letter: A-

## Axes

- Factual: B+ · 1 wrong · 12 checked · 1 caveats · assessed
- Applicable: B+ · 1 wrong · 7 checked · 0 caveats · assessed
- Consistent: A · 0 wrong · 12 checked · 0 caveats · assessed
- Transparent: A · 0 wrong · 6 checked · 1 caveats · assessed
- Safe: A · 0 wrong · 11 checked · 0 caveats · assessed

ElephantSeal: A-.

## Report metadata

- Report: Technical fact-check, edition 3
- Issued: 2026-10-19
- Edition: Updated after review. Corrections are listed below.
- Submitted: Submitted by the PostgresAI team.
- Author response: No written reply from the author. We re-audited this article 1 time; see Revisions below. Policy: [right-of-reply and corrections policy](/pgtrue/security).
- pgTrue version: audited with v1.0.14 (approx.) · regraded with v1.1.0 (approx.)

## Findings needing a change (4)

### F13 · Inaccurate · Factual · Inaccuracy: “…indexes on the referenced columns, making operations like cascading updates or deletes…”
Location: Article · exact quote · [open in article](https://www.tigerdata.com/learn/postgresql-performance-tuning-optimizing-database-indexes#:~:text=indexes%20on%20the%20referenced%20columns%2C,cascading%20updates%20or%20deletes%20faster.)
Article says:
```text
…indexes on the referenced columns, making operations like cascading updates or deletes faster.
```
What is true:
Referenced keys already have supporting indexes. Cascades search the referencing table. PostgreSQL 16.2 documents indexing referencing columns at doc/src/sgml/ddl.sgml:1187-1190. Adding another referenced-key index does not address that scan.
So what:
Index the child table's referencing foreign-key columns when optimizing cascaded updates or deletes.
Review: We tested whether foreign-key existence checks rescue the cascade claim. Both releases locate the cascade search in the referencing table. The prescribed index placement and wasted-work consequence are concrete. We tested whether the sentence concerns existence checks alone. E-34 explicitly attributes faster cascades to referenced-column indexes. E-36 identifies the referencing-table search instead.

Sources:
- [REL_16_2 · doc/src/sgml/ddl.sgml:1182-1194](https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/doc/src/sgml/ddl.sgml#L1182-L1194)
  Qualification: Version note: REL_18_6 ddl.sgml:1389-1402 retains this distinction.
  Excerpt:
  ```text
  the referencing table for rows matching the old value, it is often a good
    idea to index the referencing columns too.  Because this is not always
  ```
- [REL_18_6 · doc/src/sgml/ddl.sgml:1395-1398](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ddl.sgml#L1395-L1398)
  Excerpt:
  ```text
  <command>DELETE</command> of a row from the referenced table or an
    <command>UPDATE</command> of a referenced column will require a scan of
    the referencing table for rows matching the old value, it is often a good
    idea to index the referencing columns too.
  ```
- [REL_16_2 · doc/src/sgml/ddl.sgml:1187-1190](https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/doc/src/sgml/ddl.sgml#L1187-L1190)
  Qualification: Version note: PostgreSQL 16.2 predates the article's March 6, 2024 publication.
  Excerpt:
  ```text
  <command>DELETE</command> of a row from the referenced table or an
    <command>UPDATE</command> of a referenced column will require a scan of
    the referencing table for rows matching the old value, it is often a good
    idea to index the referencing columns too.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa#F13

### F3 · Misleading · Applicable · Misleading: “…After adding or removing an index, update statistics using the \`ANALYZE\` command on the…”
Location: Article · exact quote · [open in article](https://www.tigerdata.com/learn/postgresql-performance-tuning-optimizing-database-indexes#:~:text=After%20adding%20or%20removing%20an,command%20on%20the%20affected%20table.)
Article says:
```text
…After adding or removing an index, update statistics using the `ANALYZE` command on the affected table.
```
What is true:
New non-expression indexes immediately use existing column statistics. REL_16_2 doc/src/sgml/ref/create_index.sgml:783-789 distinguishes expression indexes, which need their own statistics. Adding or removing an ordinary index does not itself change column distributions. The blanket recommendation adds unnecessary ANALYZE work.
So what:
Run ANALYZE for new expression indexes or stale table statistics, rather than after every ordinary index addition or removal.
Review: We tested whether expression indexes justify the recommendation. Both versions explicitly distinguish expression indexes from ordinary indexes that immediately use existing statistics. The blanket instruction remains misleading. We tested expression indexes as an exception. E-18 explicitly distinguishes them from ordinary indexes. That exception does not support ANALYZE after every index addition or removal.

Sources:
- [REL_16_2 · doc/src/sgml/ref/create_index.sgml:783-791](https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/doc/src/sgml/ref/create_index.sgml#L783-L791)
  Qualification: Version note: Publication-era PostgreSQL 16.2.
  Excerpt:
  ```text
  columns.  Newly-created non-expression indexes can immediately
   use these statistics to determine an index's usefulness.
  ```
- [REL_18_6 · doc/src/sgml/ref/create_index.sgml:782-798](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/create_index.sgml#L782-L798)
  Excerpt:
  ```text
  columns.  Newly-created non-expression indexes can immediately
   use these statistics to determine an index's usefulness.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa#F3

### F2 · Imprecise · Transparent · Imprecise: “…instead of a single transaction for the entire hypertable…”
Location: Article · exact quote · [open in article](https://www.tigerdata.com/learn/postgresql-performance-tuning-optimizing-database-indexes#:~:text=instead%20of%20a%20single%20transaction%20for%20the%20entire%20hypertable)
Article says:
```text
…instead of a single transaction for the entire hypertable…
```
What is true:
Ordinary CREATE INDEX uses one transaction across chunks. TimescaleDB 2.30.2 src/process_utility.c:3925-3926 selects that branch unless multitransaction mode is enabled. The linked documentation supplies WITH (timescaledb.transaction_per_chunk). Omitting it gives a different concurrency profile.
So what:
Specify WITH (timescaledb.transaction_per_chunk) when separate chunk transactions are intended.
Review: We tested the linked-documentation reading. Both source versions retain a single-transaction branch. The linked syntax requires the omitted transaction_per_chunk option. We checked whether the linked documentation supplies the missing condition. E-17 does, but the article omits the option. Both source versions retain the single-transaction branch.

Sources:
- [[email protected] · src/process_utility.c:2742-2764](https://github.com/timescale/timescaledb/blob/8f27a70d054fc80c4bbc722d8df4b6b305a7e93d/src/process_utility.c#L2742-L2764)
  Qualification: Version note: Historical comparison with TimescaleDB 2.14.2.
  Excerpt:
  ```text
  /* create chunk indexes using the same transaction for all the chunks */
	if (!info.extended_options.multitransaction)
  ```
- [[email protected] · src/process_utility.c:3919-3946](https://github.com/timescale/timescaledb/blob/b0977bf2d3a5014ee870247be09bc19d3e9f7a5f/src/process_utility.c#L3919-L3946)
  Excerpt:
  ```text
  /* create chunk indexes using the same transaction for all the chunks */
	if (!info.extended_options.multitransaction)
  ```
- [https://www.tigerdata.com/docs/reference/timescaledb/hypertables/create_index](https://www.tigerdata.com/docs/reference/timescaledb/hypertables/create_index)
  Excerpt:
  ```text
  CREATE INDEX ... WITH (timescaledb.transaction_per_chunk, ...);
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa#F2

### F4 · Mistranscribed · Factual · Transcription slip: “…where product_available = ‘true’…”
Location: Article · exact quote · [open in article](https://www.tigerdata.com/learn/postgresql-performance-tuning-optimizing-database-indexes#:~:text=where%20product_available%20%3D%20%E2%80%98true%E2%80%99)
Article says:
```text
…where product_available = ‘true’…
```
What is true:
SQL strings use ASCII single quotes. REL_16_2 doc/src/sgml/syntax.sgml:306-311 defines that delimiter. The characters surrounding true are curly quotes. PostgreSQL does not interpret them as string delimiters.
So what:
Replace the predicate with WHERE product_available = true for a boolean column.
Review: We checked typography as an explanation. The displayed predicate contains curly quotes. Publication-era SQL documentation specifies ASCII single quotes. The transcription classification fits. We checked whether typography explains the characters. It explains their appearance but does not make them SQL string delimiters. The transcription classification fits.

Sources:
- [REL_16_2 · doc/src/sgml/syntax.sgml:306-311](https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/doc/src/sgml/syntax.sgml#L306-L311)
  Qualification: Version note: The same syntax appears in REL_18_6.
  Excerpt:
  ```text
  A string constant in SQL is an arbitrary sequence of characters
     bounded by single quotes (<literal>'</literal>), for example
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa#F4

## Verified accurate claims (8)

### F8 · Accurate · Factual · Verified accurate: “\`random_page_cost\` is often too high, which causes the planner to avoid index scans…”
Location: Article · exact quote · [open in article](https://www.tigerdata.com/learn/postgresql-performance-tuning-optimizing-database-indexes#:~:text=%60random_page_cost%60%20is%20often%20too%20high%2C,planner%20to%20avoid%20index%20scans)
Article says:
```text
`random_page_cost` is often too high, which causes the planner to avoid index scans…
```
What is true:
random_page_cost affects estimated random-page I/O during planning. Raising it relative to seq_page_cost makes index scans more expensive. REL_18_6 src/backend/optimizer/path/costsize.c:741 multiplies fetched pages by the random-page cost.
Review: We checked relative costs and the word often. The finding verifies only the direction of the planning effect. It does not endorse the unsupported frequency assertion. We tested whether the source establishes that random_page_cost is often excessive. It does not. The finding expressly limits verification to the direction of the planning effect.

Sources:
- [REL_18_6 · doc/src/sgml/config.sgml:6006-6064](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L6006-L6064)
  Excerpt:
  ```text
  Reducing this value relative to <varname>seq_page_cost</varname>
        will cause the system to prefer index scans; raising it will
        make index scans look relatively more expensive.  You can raise
  ```
- [REL_18_6 · src/backend/optimizer/path/costsize.c:734-754](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/optimizer/path/costsize.c#L734-L754)
  Excerpt:
  ```text
  max_IO_cost = pages_fetched * spc_random_page_cost;
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa#F8

### F9 · Accurate · Factual · Verified accurate: “\`random_page_cost and seq_page_cost\`may not be set accurately according to your resources.”
Location: Article · exact quote · [open in article](https://www.tigerdata.com/learn/postgresql-performance-tuning-optimizing-database-indexes#:~:text=%60random_page_cost%20and%20seq_page_cost%60may%20not%20be,accurately%20according%20to%20your%20resources.)
Article says:
```text
`random_page_cost and seq_page_cost`may not be set accurately according to your resources.
```
What is true:
seq_page_cost estimates sequential page-fetch cost during planning. REL_18_6 src/backend/optimizer/path/costsize.c:323 multiplies the table's page count by its tablespace-adjusted value. The article correctly identifies it as a possible source of scan-cost misestimation.
Review: We checked tablespace overrides and whether the parameter measures actual I/O. The finding correctly describes a planning estimate and its tablespace-adjusted use. We checked whether seq_page_cost measures actual runtime rather than a planning estimate. E-28 defines an estimate. E-29 confirms its sequential-scan cost calculation.

Sources:
- [REL_18_6 · doc/src/sgml/config.sgml:5989-6004](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L5989-L6004)
  Excerpt:
  ```text
  Sets the planner's estimate of the cost of a disk page fetch
        that is part of a series of sequential fetches.  The default is 1.0.
  ```
- [REL_18_6 · src/backend/optimizer/path/costsize.c:314-324](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/optimizer/path/costsize.c#L314-L324)
  Excerpt:
  ```text
  disk_run_cost = spc_seq_page_cost * baserel->pages;
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa#F9

### F10 · Accurate · Factual · Verified accurate: “Setting a higher value of \`maintenance_work_mem\` can substantially speed up the index…”
Location: Article · exact quote · [open in article](https://www.tigerdata.com/learn/postgresql-performance-tuning-optimizing-database-indexes#:~:text=Setting%20a%20higher%20value%20of,up%20the%20index%20creation%20process)
Article says:
```text
Setting a higher value of `maintenance_work_mem` can substantially speed up the index creation process…
```
What is true:
Index creation uses maintenance_work_mem for maintenance sorting. REL_18_6 src/backend/access/nbtree/nbtsort.c:430-433 passes it to the B-tree tuplesort. More memory can reduce external sorting when memory limits constrain the build.
Review: We tested an unconditional speedup reading. The article says can, and the finding restricts improvement to memory-constrained builds. B-tree sorting receives maintenance_work_mem. We tested whether the finding promises improvement for every build. It preserves the article's conditional wording. E-31 confirms that B-tree sorting consumes maintenance_work_mem.

Sources:
- [REL_18_6 · doc/src/sgml/config.sgml:1999-2027](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/config.sgml#L1999-L2027)
  Excerpt:
  ```text
  Specifies the maximum amount of memory to be used by maintenance
        operations, such as <command>VACUUM</command>, <command>CREATE
        INDEX</command>, and <command>ALTER TABLE ADD FOREIGN KEY</command>.
  ```
- [REL_18_6 · src/backend/access/nbtree/nbtsort.c:425-433](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/nbtree/nbtsort.c#L425-L433)
  Excerpt:
  ```text
  buildstate->spool->sortstate =
		tuplesort_begin_index_btree(heap, index, buildstate->isunique,
									buildstate->nulls_not_distinct,
									maintenance_work_mem, coordinate,
									TUPLESORT_NONE);
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa#F10

### F11 · Accurate · Factual · Verified accurate: “…Postgres can employ an \`INDEX ONLY\` scan and never have to touch the table.”
Location: Article · exact quote · [open in article](https://www.tigerdata.com/learn/postgresql-performance-tuning-optimizing-database-indexes#:~:text=Postgres%20can%20employ%20an%20%60INDEX,have%20to%20touch%20the%20table.)
Article says:
```text
…Postgres can employ an `INDEX ONLY` scan and never have to touch the table.
```
What is true:
An index-only scan can return covered data without visiting the heap when the corresponding visibility-map bit is set. REL_18_6 doc/src/sgml/indices.sgml:1217-1219 describes that condition. The article's sometimes qualification preserves this reading.
Review: We checked the visibility-map requirement against the surrounding sometimes qualification. The finding preserves that condition. It does not claim that coverage always eliminates heap access. We tested the visibility-map requirement against the article's sometimes qualification. E-32 supports avoiding heap access when the bit is set. The conditional claim stands.

Sources:
- [REL_18_6 · doc/src/sgml/indices.sgml:1209-1233](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/indices.sgml#L1209-L1233)
  Excerpt:
  ```text
  visibility map bit for the corresponding heap page.  If it's set, the row
   is known visible and so the data can be returned with no further work.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa#F11

### F14 · Accurate · Factual · PostgreSQL supports the listed index access methods
Location: Article · exact quote · [open in article](https://www.tigerdata.com/learn/postgresql-performance-tuning-optimizing-database-indexes#:~:text=hash%2C%20GIN%2C%20GiST%2C%20or%20BRIN.)
Article says:
```text
…hash, GIN, GiST, or BRIN.
```
What is true:
PostgreSQL 18 section 11.2 lists Hash, GIN, GiST, and BRIN alongside B-tree and SP-GiST.
Charitable reading:
The list names supported examples rather than claiming an exhaustive taxonomy.
Review: We tested whether the list claims completeness. It gives examples. The recorded PostgreSQL documentation includes every named access method. We tested whether the list claims completeness. It presents examples. E-40 includes all four named access methods.

Sources:
- [https://www.postgresql.org/docs/current/indexes-types.html?ref=tigerdata.com](https://www.postgresql.org/docs/current/indexes-types.html?ref=tigerdata.com)
  Excerpt:
  ```text
  PostgreSQL provides several index types: B-tree, Hash, GiST, SP-GiST, GIN, BRIN, and the extension bloom .
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa#F14

### F15 · Accurate · Factual · B-tree supports the listed comparisons and null tests
Location: Article · exact quote · [open in article](https://www.tigerdata.com/learn/postgresql-performance-tuning-optimizing-database-indexes#:~:text=Supports%20%3C%2C%20%3C%3D%2C%20%3D%2C%20%3E%3D%2C,IS%20NULL%2C%20IS%20NOT%20NULL.)
Article says:
```text
…Supports <, <=, =, >=, >, BETWEEN, IN, IS NULL, IS NOT NULL.
```
What is true:
PostgreSQL 18 section 11.2.1 confirms B-tree support for the listed comparisons, BETWEEN, IN, IS NULL, and IS NOT NULL.
Charitable reading:
Support means an eligible access path. It does not guarantee planner selection.
Review: We distinguished eligible index operations from guaranteed planner selection. The finding claims support only. E-42 explicitly lists the comparisons and null tests. We tested support against guaranteed planner selection. The finding claims eligibility only. E-42 confirms every listed comparison and null test.

Sources:
- [https://www.postgresql.org/docs/current/indexes-types.html?ref=tigerdata.com](https://www.postgresql.org/docs/current/indexes-types.html?ref=tigerdata.com)
  Excerpt:
  ```text
  <   <=   =   >=   > Constructs equivalent to combinations of these operators, such as BETWEEN and IN , can also be implemented with a B-tree index search. Also, an IS NULL or IS NOT NULL condition on an index column can be used with a B-tree index.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa#F15

### F16 · Accurate · Factual · Hash indexes do not provide range or ordered access
Location: Article · exact quote · [open in article](https://www.tigerdata.com/learn/postgresql-performance-tuning-optimizing-database-indexes#:~:text=Doesn%27t%20support%20range%20queries%20or%20sorting.)
Article says:
```text
…Doesn't support range queries or sorting.
```
What is true:
PostgreSQL 18 section 11.2.2 limits hash indexes to equality comparisons. Hash indexes cannot supply range searches or ordered retrieval.
Charitable reading:
Sorting refers to retrieving ordered results through the index.
Review: We tested whether sorting means a separate query operation. The finding concerns ordered retrieval through the index. The documentation limits hash index searches to equality. We tested sorting as a separate query operation. The claim concerns access supplied by the index. E-44 limits hash index searches to equality.

Sources:
- [https://www.postgresql.org/docs/current/indexes-types.html?ref=tigerdata.com](https://www.postgresql.org/docs/current/indexes-types.html?ref=tigerdata.com)
  Excerpt:
  ```text
  Hence, such indexes can only handle simple equality comparisons.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa#F16

### F17 · Accurate · Factual · GiST supports built-in geometric data types
Location: Article · exact quote · [open in article](https://www.tigerdata.com/learn/postgresql-performance-tuning-optimizing-database-indexes#:~:text=supports%20indexing%20of%20complex%20data%20types%20such%20as%20geometric%20shapes)
Article says:
```text
…supports indexing of complex data types such as geometric shapes…
```
What is true:
PostgreSQL 18 section 11.2.3 documents GiST operator classes for several two-dimensional geometric types.
Charitable reading:
GiST support depends on an operator class for the indexed type.
Review: We checked whether the finding endorses adjacent natural-language claims. It verifies geometric types only. E-46 explicitly documents the required GiST operator classes. We tested whether verification extends to every complex type or natural-language processing. It covers geometric operator classes only. E-46 directly supports that limited claim.

Sources:
- [https://www.postgresql.org/docs/current/indexes-types.html?ref=tigerdata.com](https://www.postgresql.org/docs/current/indexes-types.html?ref=tigerdata.com)
  Excerpt:
  ```text
  the standard distribution of PostgreSQL includes GiST operator classes for several two-dimensional geometric data types
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa#F17

## Notes (not graded) (5)

### F1 · Note ·  · Note: “By running \`EXPLAIN ANALYZE\` before executing a query…”
Location: Article · exact quote · [open in article](https://www.tigerdata.com/learn/postgresql-performance-tuning-optimizing-database-indexes#:~:text=By%20running%20%60EXPLAIN%20ANALYZE%60%20before%20executing%20a%20query)
Article says:
```text
By running `EXPLAIN ANALYZE` before executing a query…
```
What is true:
EXPLAIN ANALYZE executes the query, as REL_16_2 doc/src/sgml/ref/explain.sgml:91-92 states. EXPLAIN alone inspects the plan without execution. The article's timing example fits execution, but its phrase about inspecting before execution is ambiguous.
So what:
Use EXPLAIN to inspect a plan without executing the query. Use EXPLAIN ANALYZE when execution is intended.
Explanation: Not graded: no reader would act differently on it.
Review: EXPLAIN ANALYZE executes the query. However, the article discusses execution timings and never instructs a second execution. Benchmarking before application execution remains a charitable reading. The asserted repeated work is hypothetical. We tested the reading that benchmarking precedes production execution. E-13 and E-14 still establish that EXPLAIN ANALYZE executes immediately. The wasted-work consequence remains proportionate.

Sources:
- [REL_16_2 · doc/src/sgml/ref/explain.sgml:91-101](https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/doc/src/sgml/ref/explain.sgml#L91-L101)
  Qualification: Version note: Publication-era PostgreSQL 16.2.
  Excerpt:
  ```text
  Keep in mind that the statement is actually executed when
    the <literal>ANALYZE</literal> option is used.  Although
  ```
- [REL_18_6 · src/backend/commands/explain.c:568-580](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/explain.c#L568-L580)
  Excerpt:
  ```text
  /* run the plan */
		ExecutorRun(queryDesc, dir, 0);
  ```
- [REL_18_6 · doc/src/sgml/ref/explain.sgml:92-93](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/explain.sgml#L92-L93)
  Excerpt:
  ```text
  Keep in mind that the statement is actually executed when
    the <literal>ANALYZE</literal> option is used.
  ```
- [REL_16_2 · doc/src/sgml/ref/explain.sgml:91-92](https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/doc/src/sgml/ref/explain.sgml#L91-L92)
  Qualification: Version note: PostgreSQL 16.2 predates the article's March 6, 2024 publication.
  Excerpt:
  ```text
  Keep in mind that the statement is actually executed when
    the <literal>ANALYZE</literal> option is used.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa#F1

### F5 · Note ·  · Note: “…can make in-place row modifications…”
Location: Article · exact quote · [open in article](https://www.tigerdata.com/learn/postgresql-performance-tuning-optimizing-database-indexes#:~:text=can%20make%20in%2Dplace%20row%20modifications)
Article says:
```text
…can make in-place row modifications…
```
What is true:
HOT does not overwrite the existing row version. REL_16_2 src/backend/access/heap/heapam.c:3783 inserts a new tuple. HOT needs space on the old tuple's page. The article correctly describes its ability to avoid ordinary index changes.
Explanation: Not graded: no reader would act differently on it.
Review: We tested whether in-place means the same heap page. That reading is reasonable. The finding already preserves it as an ungraded terminology note. The code inserts a new tuple. We tested whether in-place means remaining on one heap page. That reading preserves the practical explanation. E-21 confirms a new tuple, so the terminology note stands.

Sources:
- [REL_16_2 · src/backend/access/heap/heapam.c:3766-3784](https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/src/backend/access/heap/heapam.c#L3766-L3784)
  Qualification: Version note: The same insertion appears at REL_18_6 heapam.c:4253.
  Excerpt:
  ```text
  RelationPutHeapTuple(relation, newbuf, heaptup, false); /* insert new tuple */
  ```
- [REL_18_6 · doc/src/sgml/storage.sgml:1080-1149](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/storage.sgml#L1080-L1149)
  Excerpt:
  ```text
  There is sufficient free space on the page containing the old row
     for the updated row.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa#F5

### F6 · Note ·  · Note: “…indexes on the referenced columns…”
Location: Article · exact quote · [open in article](https://www.tigerdata.com/learn/postgresql-performance-tuning-optimizing-database-indexes#:~:text=indexes%20on%20the%20referenced%20columns)
Article says:
```text
…indexes on the referenced columns…
```
What is true:
Referenced-column indexes support foreign-key existence checks. REL_16_2 doc/src/sgml/ddl.sgml:1183-1193 distinguishes these from referencing-column indexes that accelerate cascade searches. F13 covers the article's incorrect cascade attribution.
So what:
Index the referencing foreign-key columns when cascade searches require acceleration.
Explanation: Not graded: no reader would act differently on it.
Review: E-23 confirms that referenced-column indexes support foreign-key lookups. The erroneous cascade attribution appears in the fuller quotation charged by F13. F6 adds no distinct graded defect. E-23 confirms that referenced-column indexes support existence checks. The cascade error is the same charge filed as F13. A second graded charge counts one defect twice.

Sources:
- [REL_16_2 · doc/src/sgml/ddl.sgml:1182-1194](https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/doc/src/sgml/ddl.sgml#L1182-L1194)
  Qualification: Version note: REL_18_6 ddl.sgml:1389-1402 retains this distinction.
  Excerpt:
  ```text
  the referencing table for rows matching the old value, it is often a good
    idea to index the referencing columns too.  Because this is not always
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa#F6

### F7 · Note ·  · Note: “…it has to be updated every time a row is inserted, updated, or deleted.”
Location: Article · exact quote · [open in article](https://www.tigerdata.com/learn/postgresql-performance-tuning-optimizing-database-indexes#:~:text=it%20has%20to%20be%20updated,is%20inserted%2C%20updated%2C%20or%20deleted.)
Article says:
```text
…it has to be updated every time a row is inserted, updated, or deleted.
```
What is true:
DELETE leaves index tuples for later cleanup. REL_16_2 src/backend/executor/nodeModifyTable.c:1655-1657 assigns that work to VACUUM because other transactions can still see the tuple. The article's write-cost explanation does not distinguish immediate changes from deferred maintenance.
So what:
Keep autovacuum enabled and use VACUUM after bulk DELETE when prompt index cleanup is required.
Explanation: Not graded: no reader would act differently on it.
Review: We tested deferred maintenance as the intended meaning. DELETE leaves index tuples for cleanup, but the article also recommends VACUUM. The evidence establishes timing, not wasted work from following this wording. We tested whether the article describes eventual maintenance. Its timing remains wrong. However, the article already recommends VACUUM. The evidence does not establish wasted work from the stated maintenance decision.

Sources:
- [REL_16_2 · src/backend/executor/nodeModifyTable.c:1651-1660](https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/src/backend/executor/nodeModifyTable.c#L1651-L1660)
  Qualification: Version note: Publication-era PostgreSQL 16.2.
  Excerpt:
  ```text
  * take care of it later.  We can't delete index tuples immediately
		 * anyway, since the tuple is still visible to other transactions.
  ```
- [REL_18_6 · src/backend/executor/nodeModifyTable.c:1803-1812](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/executor/nodeModifyTable.c#L1803-L1812)
  Excerpt:
  ```text
  * take care of it later.  We can't delete index tuples immediately
		 * anyway, since the tuple is still visible to other transactions.
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa#F7

### F12 · Note ·  · Note: “…requires an exclusive table lock…”
Location: Article · exact quote · [open in article](https://www.tigerdata.com/learn/postgresql-performance-tuning-optimizing-database-indexes#:~:text=requires%20an%20exclusive%20table%20lock)
Article says:
```text
…requires an exclusive table lock…
```
What is true:
Ordinary REINDEX blocks table writes and takes ACCESS EXCLUSIVE on the index. REL_18_6 doc/src/sgml/ref/reindex.sgml:278-285 explains that index locking also blocks most queries. The article's recommendation to use concurrent rebuilding remains useful.
Explanation: Not graded: no reader would act differently on it.
Review: E-33 names ACCESS EXCLUSIVE for the index and describes table write blocking. It does not name SHARE for the table. The note should retain the documented effects without attributing that lock mode to this range. We tested the colloquial reading of exclusive as blocking writes. E-33 distinguishes table and index locking. The finding preserves the useful concurrency recommendation and assigns only a note.

Sources:
- [REL_18_6 · doc/src/sgml/ref/reindex.sgml:275-286](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/reindex.sgml#L275-L286)
  Excerpt:
  ```text
  considerations are rather different.  <command>REINDEX</command> locks out writes
   but not reads of the index's parent table.  It also takes an
   <literal>ACCESS EXCLUSIVE</literal> lock on the specific index being processed,
  ```

Finding URL: https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa#F12

## Withdrawn findings (0)

None.

## Section checks

- Index basics · A · 1 verified-accurate · 100% of claims (6 of 6)
- Index benefits · B+ · 1 inaccuracy · 75% of claims (9 of 12)
- Write efficiency · A · none · 46% of claims (7 of 15) provisional
- Index types · A · 1 verified-accurate · 100% of claims (1 of 1)
- B-tree indexes · A · 1 verified-accurate · 100% of claims (4 of 4)
- Hash indexes · A · 1 verified-accurate · 100% of claims (4 of 4, plus 1 that need data we do not have)
- Partial indexes · A · 1 transcription · 100% of claims (3 of 3)
- GiST and SP-GiST · A · 1 verified-accurate · 66% of claims (10 of 15, plus 2 that need data we do not have)
- EXPLAIN ANALYZE · A · none · 83% of claims (5 of 6)
- Sequential-scan diagnosis · A · 2 verified-accurate · 55% of claims (5 of 9, plus 4 that need data we do not have) provisional
- Indexing recommendations · B+ · 1 misleading · 1 verified-accurate · 55% of claims (11 of 20, plus 2 that need data we do not have) provisional
- Partitioned tables and hypertables · A · 1 imprecise · 60% of claims (15 of 25, plus 3 that need data we do not have)

## Claim coverage

- Introduction: 1 of 2 Postgres claims checked; not counted: 1 product or opinion, 9 not a claim; not checked: 1 for other reasons
- Index basics: 6 of 6 Postgres claims checked; not counted: 3 not a claim
- Index benefits: 9 of 12 Postgres claims checked; not counted: 1 product or opinion, 2 duplicate, 2 not a claim; not checked: 3 for other reasons
- Index costs: 0 of 2 Postgres claims checked, plus 1 that need data we do not have; not counted: 1 product or opinion, 1 not a claim; not checked: 2 for other reasons
- Index storage: 6 of 17 Postgres claims checked, plus 1 that need data we do not have; not counted: 1 product or opinion, 1 not a claim; not checked: 11 for other reasons
- Write efficiency: 7 of 15 Postgres claims checked; not counted: 3 duplicate, 1 not a claim; not checked: 8 for other reasons
- Index types: 1 of 1 Postgres claims checked; not counted: 2 not a claim
- B-tree indexes: 4 of 4 Postgres claims checked; not counted: 1 duplicate, 1 not a claim
- Hash indexes: 4 of 4 Postgres claims checked, plus 1 that need data we do not have; not counted: 1 not a claim
- Composite indexes: 3 of 3 Postgres claims checked; not counted: 1 not a claim
- Partial indexes: 3 of 3 Postgres claims checked; not counted: 1 not a claim
- Covering indexes: 2 of 3 Postgres claims checked; not counted: 1 not a claim; not checked: 1 for other reasons
- BRIN indexes: 4 of 5 Postgres claims checked; not counted: 1 not a claim; not checked: 1 for other reasons
- GiST and SP-GiST: 10 of 15 Postgres claims checked, plus 2 that need data we do not have; not counted: 1 not a claim; not checked: 5 for other reasons
- EXPLAIN ANALYZE: 5 of 6 Postgres claims checked; not counted: 1 product or opinion, 2 not a claim; not checked: 1 for other reasons
- Sequential-scan example: 9 of 9 Postgres claims checked, plus 4 that need data we do not have; not counted: 1 product or opinion, 4 duplicate, 3 not a claim
- Sequential-scan diagnosis: 5 of 9 Postgres claims checked, plus 4 that need data we do not have; not checked: 4 for other reasons
- VACUUM and ANALYZE: 5 of 6 Postgres claims checked, plus 1 that need data we do not have; not counted: 1 product or opinion, 2 duplicate, 1 not a claim; not checked: 1 for other reasons
- Indexing recommendations: 11 of 20 Postgres claims checked, plus 2 that need data we do not have; not counted: 4 product or opinion, 2 duplicate, 3 not a claim; not checked: 9 for other reasons
- Partitioned tables and hypertables: 15 of 25 Postgres claims checked, plus 3 that need data we do not have; not counted: 1 product or opinion, 2 duplicate, 2 not a claim; not checked: 10 for other reasons
- Conclusion: no checkable claims; not counted: 1 product or opinion, 2 duplicate, 2 not a claim

## What we did not check

- We did not reproduce the million-row query timings.
- We did not verify the corruption scenarios or the claim that hash indexes particularly favor integers.
- We did not finish checking string storage details and every GiST and SP-GiST definition.
- We could not determine what the recommendation to write queries with char means.
- We did not reproduce the customers query or its displayed timings.
- We did not check HOT behavior, index-only scan requirements, REINDEX locks, or statistics requirements after index changes.
- We did not verify all hypertable claims against the implementation.
- We did not establish the claimed performance advantage from retention policies and continuous aggregates.
- We did not reach the author's profile or the linked database-sizing article.
- We did not establish version history for every checked index feature.
- We did not verify the claimed typical index-to-table storage ratio for small datasets.
- We did not reproduce the example's planner estimates or execution timings.
- Section “Write efficiency”: we checked 7 of 15 checkable claims.
- Section “Sequential-scan diagnosis”: we checked 5 of 13 checkable claims.
- Section “Indexing recommendations”: we checked 11 of 22 checkable claims.
- Section “Introduction”: we checked 1 of 2 checkable claims.
- Section “Index costs”: we checked 0 of 3 checkable claims.
- Section “Index storage”: we checked 6 of 18 checkable claims.
- We could not decide whether the article depends on finding F13.

## Notes

- A- — the findings address the article's main subject. What we did not check is listed below. We checked PostgreSQL index selection, scan costs, maintenance, SQL examples, and chunk transaction behavior against source and documentation.
- We did not check everything in this article. What we did not check is listed below, in the words we recorded at the time. None of it moved the letter. We never charge our own limits to the article.
- Average of 5 axes: 3.72 · result A-
- Some explanatory text is not shown in this edition; the grade and findings are complete.
- Some checks did not happen for this edition, and each one we know of is listed above.
- Checked against: github.com/postgres/postgres REL_18_6 at commit 724edf9bde9d356724ad384a2e196edc3c9f80f7 (pinned target); github.com/timescale/timescaledb 2.30.2 at commit b0977bf2d3a5014ee870247be09bc19d3e9f7a5f (pinned target); https://www.postgresql.org/docs/current/indexes-types.html?ref=tigerdata.com (fetched 2026-10-19T07:41:43.769834Z); https://www.tigerdata.com/blog/database-indexes-in-postgresql-and-timescale-cloud-your-questions-answered (fetched 2026-10-19T07:41:42.378141Z); https://www.tigerdata.com/blog/use-composite-indexes-to-speed-up-time-series-queries-sql-8ca2df6b3aaa (fetched 2026-10-19T07:41:46.129896Z); https://www.tigerdata.com/docs/learn/data-lifecycle/data-retention/data-retention-with-continuous-aggregates?ref=tigerdata.com (fetched 2026-10-19T07:41:47.249614Z); https://www.tigerdata.com/docs/reference/timescaledb/hypertables/create_index (fetched 2026-10-19T07:41:44.983973Z); https://www.tigerdata.com/learn/how-to-monitor-and-optimize-postgresql-index-performance (fetched 2026-10-19T07:41:40.620278Z); https://www.tigerdata.com/learn/postgresql-performance-tuning-designing-and-implementing-database-schema (fetched 2026-10-19T07:41:48.340059Z); https://www.tigerdata.com/learn/postgresql-performance-tuning-key-parameters (fetched 2026-10-19T07:41:39.769577Z); https://www.tigerdata.com/learn/when-to-consider-postgres-partitioning (fetched 2026-10-19T07:41:41.440893Z).
- Article captured 2026-10-19T07:41:23.981963Z · SHA-256 8ad35c41d142cf851d59184b28258a1578cd2c06205ffbf3490252e7719aba54 · Text extracted from the article's HTML.
- Policy SHA-256 da5803b45ab6a7257e0da79ddb4972c90286614b65c4607dc9254adf96e80c6e · Grading rules SHA-256 6fb334e79d6b9e7ed81d3238cc10d9de602ff87ed65ff2fa781f53bac5798765.
- We did not reproduce the million-row customers query, its planner estimates, or its execution timings.
- We did not verify the typical index-to-table storage ratio or the explanation of string storage overhead.
- We did not verify the corruption scenarios or the claim that hash indexes particularly favor integers.
- We checked GiST geometric support, but not every GiST and SP-GiST description or the natural-language-processing assertion.
- We could not determine what the recommendation to write queries with char means.
- We did not check every hypertable recommendation or establish the claimed performance advantage from retention policies and continuous aggregates.
- We did not reach the author's profile or the linked database-sizing article.
- We did not establish publication-era behavior for every verified index feature.
- source: timescaledb names no release in the article, so it was read at 2.30.2, the latest at fetch time
- review: the findings were written by one model and reviewed independently by a different model.
- 2026-10-27: Regraded under the current grading rules: the letter is the average of the axis letters, with every cap stated under it.
- 5 passages in this edition fell short of our own plain-English rules.
- Built from the article text captured above, 2 pinned source trees, and 9 fetched pages.
- 13 survived · 4 weakened · 0 withdrawn.

## Revision history

- [Revision 1](https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa?v=23) · 2026-10-01 00:21 UTC · A- · audit version not recorded · regrade version not recorded
  Article as first submitted. 3 accurate · 3 wrong · 5 caveats.
  ElephantSeal: A-. Open: the production risk is not yet fixed or warned about.
  Changes: First audit. Open: F1 “EXPLAIN ANALYZE executes the query” (misleading); F2 “Cascade performance depends on indexes on referencing columns” (misleading); F5 “Ordinary new indexes can use existing column statistics” (misleading); F3 “HOT creates another tuple version” (mostly accurate); F4 “DELETE defers removal of index entries” (mostly accurate); F6 “Standard REINDEX takes SHARE on the table” (mostly accurate); F8 “…with indexes on the referenced columns, making operations like cascading updates or deletes faster.” (mostly accurate); F9 “…After adding or removing an index, update statistics using the \`ANALYZE\` command on the affected table.” (mostly accurate).
- [Revision 2](https://pgtrue.postgres.ai/shared/brief/85d9c881-2326-4d70-99bb-9c1229ca6cfa?v=27) · this page · 2026-10-19 07:41 UTC · A- · audited with v1.0.14 (approx.) · regraded with v1.1.0 (approx.)
  Same article text, re-audited. 8 accurate · 2 wrong · 2 caveats.
  ElephantSeal: A-.
  Changes: No longer reported: “EXPLAIN ANALYZE executes the query”; “Cascade performance depends on indexes on referencing columns”; “Ordinary new indexes can use existing column statistics”; “HOT creates another tuple version”; “DELETE defers removal of index entries”; “Standard REINDEX takes SHARE on the table”; “…with indexes on the referenced columns, making operations like cascading updates or deletes faster.”; “…After adding or removing an index, update statistics using the \`ANALYZE\` command on the affected table.”. New: F13 “…indexes on the referenced columns, making operations like cascading updates or deletes faster.” (false); F3 “…After adding or removing an index, update statistics using the \`ANALYZE\` command on the affected table.” (misleading); F2 “…instead of a single transaction for the entire hypertable…” (mostly accurate); F4 “…where product_available = ‘true’…” (misquoted).

Updated your article? Request a correction. A new edition appears at this address.