InletDownload

Guides

Answers for the moments a database gets in the way, written for people with the problem in front of them.

Database errors

What an error means and how to fix it, reproduced on real servers.

All 58 →

Is this migration safe?

Which lock each schema change takes and whether it rewrites the table.

All 23 →

EXPLAIN, explained

Every step of a query plan, and what to do when it’s the slow one.

All 39 →

PostgreSQL lock modes

PostgreSQL’s lock modes, what blocks what, and who holds it now.

All 8 →

Connect from your Mac

Connecting to hosted and local databases from a Mac.

All 18 →

Connection strings

URL formats, options, and encoding passwords.

All 5 →
psql commands: a cheat sheetpsql’s backslash commands list databases (\l), switch to one (\c), list tables (\dt), describe a table (\d), toggle expanded output (\x) and timing (\timing), copy data to and from files (\copy) and repeat a query (\watch). Each is below with real output.Sample databases for PostgreSQL, MySQL, SQLite and MongoDBFor practice data, use Pagila or dvdrental on PostgreSQL, Sakila, employees or world on MySQL, Chinook or Northwind on almost anything, and MongoDB’s own sample datasets. Check the licence before you ship one inside something else: they range from MIT to Creative Commons share-alike to unstated.