A unique constraint where NULL conflicts with everything
by
Laurenz Albe |
01.2023 I have been faced with a request for an unusual unique constraint that puzzled me for a while. Since […]
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, […]
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 […]
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 […]
Why are my PostgreSQL updates getting slower?
by
Laurenz Albe |
10.2022 Recently, a customer asked me why a bulk load into a PostgreSQL table kept slowing down as time went […]
How to corrupt your PostgreSQL database
by
Laurenz Albe |
08.2022Of course most people do not want to corrupt their databases. These people will profit from avoiding the techniques used […]
Better SQL functions in PostgreSQL v14
by
Laurenz Albe |
07.2022We all know and value SQL functions as a handy shortcut. PostgreSQL v14 has introduced a new, better way to […]
Transaction anomalies with SELECT FOR UPDATE
by
Laurenz Albe |
06.2022© Laurenz Albe 2022 I was recently confronted with a nice example of how adding FOR UPDATE to a query […]
(Updated 2023-04-07) Even if you understand what a deadlock is, debugging deadlocks can be tricky. This article shows some […]