How to Browse Large SQLite Databases on Mac

A ten-million-row database does not need ten million rows on your screen. What matters is getting to the next relevant page.

Load a page, not the whole table

Petti fetches bounded pages, up to 500 rows and approximately 4 MB per page, and keeps a bounded row cache. Scrolling requests more data as it is needed. Opening a file reads schema metadata and a first page rather than materializing the whole table.

The project includes generated fixtures with 10,000, one million and ten million rows. These check paging and memory behavior. They are not a promise that every query on every database finishes instantly.

A fast open doesn’t make every search fast

The database still has to answer the question you ask. A search across unindexed text or a sort on an unindexed column can require substantial work. SQLite’s query-planner guide explains how indexes affect the work of finding and ordering rows.

A suitable index can help repeated lookups. The right index depends on the actual query and data. Indexes also occupy space and require maintenance when data changes, so adding every possible index is not a free improvement.

Loaded rows are not the table’s total

“500 rows loaded” describes what Petti has fetched, not the total number of rows in a table. Petti does not automatically run an exact count when you open a database. Choose Count Rows explicitly when you need that number, and allow time for it.

Ask for the data you need

When writing SQL, request the columns and rows relevant to your task. This bounded example uses an events table; adapt it to your own schema:

SELECT id, event_type, created_at
FROM events
WHERE id > 100000
ORDER BY id
LIMIT 500;

For default browsing, Petti uses keyset pagination where suitable. Other sorts and some jumps can fall back to offset-based queries. Query work runs away from the main UI thread and supports cancellation.

Handle large values separately

One row can itself be enormous. Petti protects browsing with placeholders for BLOBs and large text rather than rendering full payloads in every cell. Export operations stream data instead of first collecting an entire table in memory.

Start with a specific table, narrow the result and keep expensive work cancellable. Learn how to open a file safely, or explore the Petti preview.

Explore Petti for Mac ↗