High Performance
SQLite
Introduction
Introduction to this course
Introduction to SQLite
SQLite is safe
It's just a file
Running SQLite locally
Good uses for SQLite
SQLite's limitations
The documentation
SQLite Internals
SQLite's structure
SQLite's file format
Dot commands
Pragmas
Virtual tables
Schema
Flexible types
Types
Strict types
Dates
Booleans
Floating point
Rowid tables
Auto increments
Without rowid
Generated columns
Optimizing SQLite
Locking
Rollback mode
WAL mode
WAL vs Journal benchmarks
Busy timeout
Transaction modes
Vacuum
Analyze & Optimize
Suggested pragmas
Faster inserts
Indexes
Introduction to indexes
B+ trees
Primary, secondary, and clustered indexes
Without rowid tables
Benchmarking without rowid tables
Imposter tables
Primary key data types
Where to add indexes
Index selectivity
Composite indexes
Composite ordering
Covering indexes
Partial indexes
Indexes on expressions
Automatic indexes
Duplicate indexes
Indexing joins
Advanced SQL
Explain
Index obfuscation
Joins
Subqueries
Unions
CTEs
Recursive CTEs
Window functions
Dealing with NULLs
Row value syntax
Indexed sorting
Upserts
Returning
Aggregates
Triggers
Operating SQLite
Altering schema
Altering schema with tools
Multi-database
Multi-tenancy
Backups
Exports
How to corrupt SQLite
Advanced JSON
Intro to JSON
JSON vs. JSONB
Argument types: path, value, JSON
JSON5
Valid JSON
Creating JSON objects + arrays
JSON Extraction
Updating JSON
JSON aggregates
JSON table functions
Indexing JSON
Full Text Search
Creating FTS tables
Performing searches
Ranking results
Highlighting matches
Bonus Interviews
DHH discusses SQLite in Ruby on Rails
Distributed SQLite with Litestream and LiteFS
Offline-first, multiplayer SQLite
Production SQLite with Turso and libSQL
Migrating from Postgres to SQLite with Kent C. Dodds
Ruby on Rails with SQLite
Moving from Redis to SQLite with Mike Buckbee
Next video (8)
Introduction
Introduction to this course

Full Course

$
179
$229
USD, one-time fee
High Performance SQLite is an excellent and immersive course, featuring real-time typed commands and valuable edge case explanations. I highly recommend it for enhancing your SQLite skills.
Han-Hsun Liu
Han-Hsun Liu

SQLite for Production

Build with and integrate SQLite into your production applications.

Test Data

I've made my test data available for you to use and follow along.

Download
or
Use on Turso

Summary

Gain a deep understanding of high-performance SQLite without the need for memorization. The course focuses entirely on plain SQLite. There's no vendor lock-in, frameworks, or language dependencies. You’ll explore SQLite internals, extensions, and its broader ecosystem, with helpful comparisons to databases like MySQL and Postgres to sharpen your perspective.

Video Transcript

Hello, and welcome to High Performance SQLite. I hope you're as excited as I am. I kinda doubt that you are. I get very, very excited about databases and teaching and education. I love it so much.

My job here is to transfer that knowledge but also that excitement and that enthusiasm to you. A little bit about me. My name is Aaron Francis. I'm I wear a lot of hats. I'm a database educator.

I make a lot of videos. I'm a software developer. But none of that matters compared to the fact that I have 2 sets of twins. So I have 4 kids. 2 of them are 3 and 2 of them are, like, 6 months old.

That is by far my favorite job, but not the reason that you are here. Let me tell you a little bit about what we're gonna do in this course. My goal is to transfer all of this knowledge about SQLite and production and high performance SQL, transfer all of that to you. Throughout this course, we're gonna be we're we're gonna be learning a whole lot. My goal for you, my goal for you is not that you ever memorize anything.

You can memorize stuff. My goal is to teach you so that you will understand it and so that you can intuit the answer later. So if you just memorize a bunch of stuff and then you forget it that's no good. But if you deeply learn it then when new questions come along you have a pretty good framework upon which you can base your own answer. So that's my goal.

Each video is going to build on itself. We're gonna look at the internals of SQLite. We're gonna look at the file format. We're gonna go over advanced SQL. We're gonna go over a lot of stuff and it all builds on itself.

Hopefully you can watch this straight through. Take your time. There there are a lot of videos here. Take your time. But hopefully you can watch it straight through.

The stuff that we learn at the beginning about some of the fundamentals will make the videos later a lot easier because you'll have that nice foundational grasp. What you're gonna see on the screen is a lot of times you're gonna see me talking like this. Sometimes I'll be up in the corner or down in the corner or wherever wherever producer Steve decides to put me is where I'll be. And we'll see either the command line or maybe a database GUI, but that's about as much as we're gonna see. This course is not specific to any framework or programming language or anything like that.

We are really really really going to focus on SQLite. That brings up a great question. What about Turso? Turso has sponsored this course. What does that actually mean?

Turso has sponsored this course which allows us to make a huge portion of these videos free and allows me and those many children to eat during that period when we're spending all of this time creating the course. We're very very grateful to Turso for sponsoring this course. What I'm going to teach you here is not Turso specific. This isn't this isn't a Turso course. I'm gonna teach you everything you need to know about vanilla SQLite so you can do it on your own.

That being said, Turso makes life a lot easier. So everywhere that I teach you vanilla SQLite, I'm going to try to tell you if potentially Turso makes that easier. You'll know how to do everything on your own, but if you want the easy way out, Turso is a great, great option. So don't be afraid that this is going to be vendor specific. It's not vendor specific.

It's not framework specific. It's not language specific. It is SQLite specific. So we're gonna cover the internals. We're gonna cover some extensions, the ecosystem.

We're gonna cover all kinds of stuff. Throughout the entire course I'm going to try to highlight the differences between SQLite and something like MySQL or Postgres. There are so many differences that making a single video about the differences doesn't make a whole lot of sense. I might try to wrap some of them up into a single video. But everywhere throughout the course I'm gonna say, hey, if you're coming from MySQL, this might be different. Or if you're coming from Postgres, this might be different. Keep that in mind as we're going. I hope that you enjoy this. I would love any feedback that you have.

We put a lot of work into this. Like I said, education is a joy for me. I love teaching. I love databases, weirdly enough. And so this this is a lot of work, but it's a joy for me, and I hope that you really enjoy it.

Alright. Let's get started.