Skip to content(if available)orjump to list(if available)

Show HN: SQLite disk page explorer

Show HN: SQLite disk page explorer

45 comments

·February 6, 2025

simonw

This is really neat. I posted an animated GIF screenshot here https://simonwillison.net/2025/Feb/6/sqlite-page-explorer/

QuadrupleA

Ha, honored :) When I was hacking this together the thought did occur, "I bet this is up SimonW's alley." Thanks for all the great LLM experiments & writeups.

Retr0id

Neat! It's surprisingly easy to sit down with a copy of the sqlite file format docs and start writing code to parse sqlite files (like this project does), and I'd strongly recommend it for all the same reasons listed in the "Why?" section of the readme here.

https://www.sqlite.org/fileformat.html

nayuki

Indeed, the file format is easy to read! It took me a few hours in one sitting to implement a reader.

I have some visualization tools too, but with way less features than the OP's software: https://www.nayuki.io/page/sqlite-database-file-visualizatio...

Retr0id

By the way, I just used this today, it was useful.

artps

That's really impressive! As someone who's worked with SQLite internals in the past, I know this kind of work and tinkering is no small feat. On a related note, I recently came across sqlite-repr [1] (built with Dioxus), which offers an interesting take on SQLite visualizations as well.

[1] https://torymur.github.io/sqlite-repr/

hoc

Did that for a security tool about more than ten years ago. Makes you love that tightly designed engine a bit more.

I always thought an explorer or just an base lib would be fun. Great to see yours, especially with a MIT license. Tbanks for sharing.

ks2048

This looks cool, nice job.

Maybe add a color-legend to the front page? I didn't know what the colors represented at first.

It's kind of choking on a larger db (3.6GB, 942719 pages) - maybe you can paginate the pages.

QuadrupleA

You can hover to get the page types (title attributes) and learn the color scheme that way, although it's not super clear.

And yeah, large DBs get slow; pages are iterated "server side" which can take a while when there are hundreds of thousands of them. Ideal would probably be some live-scrolling page-range API call, although maybe a crude "show next 10K pages" or something would work too.

rousbound_

Nice project, unfortunately when I run the executable it throws the error: "failed to run lua code: /index.lua:3: module 'utils' not found:".

shlomo_z

Thank you!

As someone who isn't disciplined enough to sit through a course or class, this was a really good way to visualize what's going on under the hood, and how to structure my data more efficiently.

jaseemabid

I recently wrote an explainer for the sqlite file format with some helpful diagrams. This might help.

https://blog.jabid.in/2024/11/24/sqlite.html

null

[deleted]

wwader

The sqlite source includes a CLI tool called showdb that is quite nice for poking around in database files

ShaggyHotDog

Neat. Being learning about databases and this is very helpful!

aappleby

Tool works well.

jas39

A true masterpiece:)