A schematic contrasts direct table-row traversal with adjacent non-covering index entries that each lead to table payload lookups. The five drawn rows are schematic, not the fixture population or a timing result.

Full table scans can win on small tables

An index trades storage and write work for a possible reduction in read work. A full scan can win when the table is small or a predicate selects much of it, but neither row count nor selectivity decides alone. Projection, ordering, caching, row width, and available access paths change the comparison. Start with the query’s actual result contract. ...

September 16, 2027 · 5 min · XB Field Notes
Within a tenant-first B-tree, time values are sorted inside each tenant group. The predicate tenant equals two and happened between 100 and 120 selects the contiguous values 102, 106, 110, 114 and 118 from tenant two only.

Composite indexes match multi-column queries

A composite B-tree index orders tuples by its first key, then by the next key within each first-key group. This structure can make a tenant-specific time range cheap to locate. The useful rule is about how much index space a predicate narrows, not a prohibition against mentioning later columns or writing WHERE conditions in a different textual order. ...

September 15, 2027 · 5 min · XB Field Notes
Two required gates, replay coverage and a new snapshot, converge on a read of balance 80.

Read replicas serve demand copies

A read replica can serve queries while another database handles writes. That can move reporting, search, or other eligible reads away from the writer, but routing a connection is only part of the design. The application must specify which committed changes a result needs to include. This article uses a PostgreSQL physical hot standby, whose normal recovery mode permits reads but does not accept ordinary writes. ...

July 12, 2027 · 6 min · XB Field Notes
Two session timelines show A allocating 1 first but committing later; B allocates 2 later and commits first, seeing only 2 before A commits. Source fixture, not rerun.

Sequential identifiers reveal allocation patterns

A sequential identifier makes nearby values easy to guess. Seeing order number four thousand gives an observer a useful place to probe, and collecting identifiers over time may reveal allocation activity. It does not establish that four thousand orders exist, that all numbers represent successful purchases, or that the largest identifier committed last. Those conclusions require information that a sequence does not contain. ...

May 29, 2027 · 5 min · XB Field Notes
A project-1 deletion-policy tree shows task 10 blocking, file 20 removed, and history 30 retaining a NULL reference. These are policy outcomes, not simultaneous effects of the blocked deletion.

Foreign keys keep references honest

A foreign key makes a relationship enforceable during ordinary database writes. A task can reference an existing project, and the database can reject an unknown project identifier even when an import or a new application code path forgets to check it. The constraint defines referential integrity; it does not decide whether the selected project is the correct one for the business operation. ...

May 25, 2027 · 5 min · XB Field Notes
Equal-scale cost bars compare index 25 versus sequential 18,000 under the estimate, then index 25,204 versus sequential 18,000 under supplied actual selectivity. Toy formula values, not measured times.

EXPLAIN plans reveal the route of a query

EXPLAIN shows the execution plan selected for a statement. It helps locate expensive work and mistaken estimates, but a slow request can also involve locks, network transfer, or application behavior outside the plan. Use plan evidence to test a specific hypothesis rather than assuming that every performance problem requires a different scan or another index. ...

May 21, 2027 · 5 min · XB Field Notes
A bound LIKE pattern A_1 branches to both A_1 and Ab1 because underscore matches one character. Local in-memory SQLite fixture.

Query parameters preserve the boundary between values and SQL

A parameterized query sends the database instruction and its values through distinct API arguments. The database interprets the instruction as SQL and uses each parameter where a value belongs. This boundary works in embedded engines such as SQLite as well as client-server databases; it does not depend on a network exchange or on an application explicitly managing named server statements. ...

May 17, 2027 · 5 min · XB Field Notes
Debit A, credit B and a ledger row share one transaction boundary. COMMIT preserves all three transactional writes; ROLLBACK discards all three. The application must choose the required writes.

Transactions make atomic commits

A transaction lets related database changes commit together or be discarded together. Debiting an account, crediting another, and recording a ledger entry belong to the same decision when the operation requires all three. PostgreSQL provides that boundary through BEGIN, COMMIT, and ROLLBACK. The application must still place the correct statements inside it: atomic execution does not discover a forgotten credit or invent a missing business check. ...

May 12, 2027 · 5 min · XB Field Notes