A query burned through 20 million rows before I could blink.
That’s when I knew I had to make Lnav my daily driver for database access. It wasn’t just fast. It was surgical. Lnav (Logfile Navigator) is best known for parsing and searching logs, but few people realize it can act as a direct database client. That single shift unlocks a brutal kind of efficiency: real-time SQL queries and log analysis in the same terminal session, without switching tools.
Why use Lnav for database access
When you hook Lnav to your database, you’re stripping away the bloat. Everything runs locally. Response times are tight. You run a query, see the results in a familiar tabular view, and drill down instantly. It supports SQLite out of the box and can attach to MySQL or PostgreSQL with simple connection strings. You can load log files as tables, blend them with live database data, and inspect patterns that would be a headache to find anywhere else.
Lnav SQL features that matter
You get grouped stats, aggregates, and joins right from your terminal. No flipping between dashboards. Queries are interactive — hitting “:” drops you into SQL mode. You can run SELECT * FROM access_log WHERE status >= 500; and watch errors light up with syntax-highlighted output. Need to chart data trends? Lnav’s built-in visualization is instant, driven by query results, no setup.
Workflow speed gains
Lnav reduces database access friction. Script-heavy workflows shrink from minutes to seconds. Teams running multiple environments can pivot between databases without losing context. You can keep search history, bookmark queries, and explore logs during live incidents without opening another app. More focus, fewer mental breaks.