/SQL

Postgres Auditing In 150 lines Of SQL

- Oliver Rice tl;dr: "Data auditing is a system that tracks changes to tables' contents over time. PostgreSQL has a robust set of features which we can leverage to create a generic auditing solution in 150 lines of SQL."

featured in #303


Working With SQL Server Identity Columns

- Greg Larsen tl;dr: "SQL Server identity columns are easy to add to a table, but you must understand how they work to use them effectively. In this article, Greg Larsen explains the nuances of SQL Server identity columns."

featured in #260


A Future For SQL On The Web

- James Long tl;dr: James developed absurd-sql - "a persistent backend for SQLite on the web." It doesn’t load the whole DB into memory, and writes persist. He explains "the absurdities of the web’s storage APIs (mainly IndexedDB), show how SQLite provides a 10x perf improvement, explain all the cool tricks that make it work, and explain the locking / transactional semantics that make it robust."

featured in #245


Against SQL

- Jamie Brandon tl;dr: Jamie believes there is "a huge amount of value to be unlocked by replacing SQL, and more generally in rethinking where and how we draw the lines between databases, query languages and programming languages.

featured in #236


Some Opinionated Thoughts On SQL Databases

- Nelson Elhage tl;dr: "SQL as an API is in many ways a relic from another era, and while it’s held up remarkably well, it also feels like it shows its age... it feels like SQL engines barely even try to offer predictability performance or to build reliable guard rails against accidentally taking the entire site down."

featured in #228


API Pagination Design

- Alexander Solovyov tl;dr: The common way to paginate in APIs - offset or page number - tends to lead to a "suboptimal" SQL query, requiring databases to find, count and throw away rows. Alexander shows us a better way, using cursor.

featured in #211


SQL Queries For Git Repositories

tl;dr: "A command-line tool for running SQL queries on git repositories meant for ad-hoc querying of git repositories on disk through a common interface (SQL)."

featured in #199


Some SQL Tricks of an Application DBA

- Haki Benita tl;dr: Haki shares "non-trivial tips" around database development with explanations, such as (1) update only what needs updating (2) disable constraints and indexes during bulk loads, and more

featured in #196


SQL Queries Don't Start With SELECT

tl;dr: Having written thousands of queries, Julia realized she didn't know the exact order a query ran. She notes the order and runs through how DB engines optimize queries.

featured in #155


10 Ways to Tweak Slow SQL Queries

- Helen Anderson tl;dr: Useful tips and checklist to ensure your SQL queries are optimized and well written.

featured in #153