PostgreSQL: DELETE vs. TRUNCATE
Archiving and database cleanup in PostgreSQL: Find out how DELETE and TRUNCATE compare in terms of performance and how the magic works
Pagination and the problem of the total result count
by
Laurenz Albe |
01.2023 When processing a big result set in an interactive application, you want to paginate the result set, that is, […]
Improving GROUP BY with CREATE STATISTICS
For a PostgreSQL time series report - find out how CREATE STATISTICS can improve performance when you group on expressions
JSON logs in PostgreSQL 15
Find out how JSON logs can be configured in PostgreSQL 15 and get all the advantages of this brand new feature
UNION ALL, data types and performance
by
Laurenz Albe |
12.2022 A while ago, I wrote about the performance impact of query parameter data types. Recently I encountered a similar […]
pg_dump compression specifications in PostgreSQL 16
What is pg_dump compression? pg_dump is a PostgreSQL utility for backing up a local or remote PostgreSQL database. It creates […]
Faceting large result sets in PostgreSQL
While the term faceting may sound foreign to you, you almost certainly have run into it in your adventures online. […]
EXPLAIN that parameterized statement in PostgreSQL!
by
Laurenz Albe |
11.2022 For detailed query performance analysis, you need EXPLAIN (ANALYZE, BUFFERS) output for an SQL statement. With a parameterized statement, […]
Rewrite OR to UNION in PostgreSQL queries
by
Laurenz Albe |
11.2022 In my article that reviles OR, I showed how in certain cases, it is possible to rewrite OR in […]
btree vs. BRIN: 2 options for indexing in PostgreSQL data warehouses
How do you index in a data warehouse? See the advantages and disadvantages of btree (AKA B-tree) and BRIN indexes in PostgreSQL.