---
title: "How Turso made connections to SQLite databases 575x faster"
description: "SQLite re-reads and parses the sqlite_schema table on every new connection, so opening a connection to a database with 10,000 tables takes about 23ms."
url: "https://swe.quest/articles/how-turso-made-connections-to-sqlite-databases-575x-faster-271f1e3891c5cf67"
canonical: "https://turso.tech/blog/how-turso-made-connections-faster"
source: "Turso"
published: "2025-07-29"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 4
tags: ["sqlite","performance","rust","concurrency"]
---

# How Turso made connections to SQLite databases 575x faster

A post on [Turso](https://swe.quest/sources/turso.md), published 2025-07-29, 4 min read, Deep dive. Original: [https://turso.tech/blog/how-turso-made-connections-faster](https://turso.tech/blog/how-turso-made-connections-faster)

## Summary

SQLite re-reads and parses the sqlite\_schema table on every new connection, so opening a connection to a database with 10,000 tables takes about 23ms. Turso, a Rust rewrite of SQLite, parses the schema once and shares it across connections in the same process. It uses Arc::make\_mut copy-on-write, so a connection only clones the schema when it changes it inside a transaction, and committed changes propagate to all connections. New connections then open in about 40 microseconds no matter how many tables exist, which is faster even than SQLite's 130 microseconds for a single-table database.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [SQLite](https://swe.quest/tags/sqlite.md) (Data & databases)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Rust](https://swe.quest/tags/rust.md) (Languages)
- [Concurrency](https://swe.quest/tags/concurrency.md) (Compilers & runtimes)

## Prerequisites

- SQLite basics ([easy posts on SQLite](https://swe.quest/tags/sqlite.md?difficulty=easy))
- Rust Arc reference counting ([easy posts on Rust](https://swe.quest/tags/rust.md?difficulty=easy))

## Keywords

Turso, SQLite, Arc::make\_mut, sqlite\_schema, copy-on-write

## Related posts

- [Faster schema changes for large SQLite databases](https://swe.quest/articles/faster-schema-changes-for-large-sqlite-databases-4f28e48522ae95e1.md): Turso · 2025-09-02 · Medium · 3 min read · SQLite, Schema migrations, Performance engineering, Rust, Storage engines
  SQLite re-parses the entire sqlite\_schema table after every ALTER TABLE, so schema changes cost time proportional to total schema size even when only one table is touched.
- [Turso Sync: a much, much, much better way to sync](https://swe.quest/articles/turso-sync-a-much-much-much-better-way-to-sync-f7b69ab545fa6e56.md): Turso · 2026-04-24 · Medium · 8 min read · SQLite, Local-first & sync, Replication, Performance engineering
  Turso, a Rust rewrite of SQLite, replaces libSQL's Embedded Replicas with a sync model built on change data capture, shipping logical changes instead of physical pages and splitting sync into separate push() and pull() operations.
- [Turso Sync: Local-First SQLite with Push and Pull](https://swe.quest/articles/turso-sync-local-first-sqlite-with-push-and-pull-8967f9053b2dc6bc.md): Turso · 2026-11-16 · Medium · 10 min read · Local-first & sync, SQLite, Replication, Event-driven architecture, Performance engineering
  Turso Sync replaces libSQL's page-based Embedded Replicas with logical row-level changes captured via CDC in Turso Database, a Rust rewrite of SQLite, so reads and writes stay local and apps call push() and pull() explicitly.
- [Turso v0.7.0](https://swe.quest/articles/turso-v0-7-0-8d3ff93b34352c14.md): Turso · 2026-07-13 · Hard · 10 min read · SQLite, Storage engines, Consistency models, Memory management, Rust
  Turso 0.7 drops the beta label and focuses on performance and robustness for embedded, multi-tenant use: the core no longer blocks on I/O, yields CPU via a new StepResult::Yield, moves to fallible allocation so OOM surfaces as an error, and treats the page cache as a soft limit like SQLite.
- [Bringing SQLite to Vercel Functions with Turso](https://swe.quest/articles/bringing-sqlite-to-vercel-functions-with-turso-afed2a49c7b44020.md): Turso · 2026-02-19 · Medium · 8 min read · SQLite, Serverless, Replication, Multi-tenancy, JavaScript
  Turso's partial sync replicates a subset of SQLite database pages into Vercel Functions so reads run in-process with no network round-trip, while writes go to the remote Turso database for durability and consistency.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
