展示 HN:ColumnLens – 在你的 Mac 上以毫秒级速度查询数百万行数据
我们持续将数据传输到云端进行分析,但现代的Mac电脑拥有足够的性能,可以在毫秒级别内本地查询数百万行数据。即使是8GB的MacBook Neo也能做到。
我开发ColumnLens是因为我希望停止将敏感数据上传到SaaS工具,仅仅为了执行一个GROUP BY操作。它是一款本地C++桌面应用,能够在大约3秒内打开超过5GB的CSV、JSONL、Parquet和Excel文件,然后让你使用DuckDB的完整SQL引擎进行查询——包括JOIN、CTE、窗口函数,所有操作都在你的机器上进行。
这个想法很简单:你的笔记本电脑完全可以作为一个优秀的分析工作站。你不应该需要一个云管道来查看你的数据。
在开发过程中我学到的一些事情:
- DuckDB的列式引擎效率极高。处理1200万行数据,查询时间在一秒以内,内存使用不到1GB,且硬件可以放进背包里。
- ImGui + OpenGL是数据密集型桌面应用的绝佳组合。没有DOM,没有布局引擎的开销——只有原始的GPU渲染。数据网格可以滚动1200万行而没有任何帧丢失。
- 我添加了一个“3D城市视图”,将行数据映射到建筑物(高度=一列,颜色=另一列)。听起来像是噱头,但异常值和聚类在这种视图中立刻显现出来,而在表格或图表中则不易察觉。我们的脑子擅长在天际线中识别高楼。
- Lua脚本的实用性超出了预期。人们编写小脚本从API获取数据、运行查询和配置图表——在应用内进行可重复的分析。
- 一切都在本地运行。零遥测,零网络调用。二进制文件大小为33MB,静态链接。
可以在<a href="https://columnlens.com" rel="nofollow">https://columnlens.com</a>免费下载。
我很想听听其他正在开发本地优先数据工具的人的想法——我认为“将一切都上传到云端”的时代正在开始回归。
查看原文
We keep shipping data to the cloud to analyze it, but modern Macs have enough horsepower to query millions of rows locally in milliseconds. Even an 8GB MacBook Neo.<p>I built ColumnLens because I wanted to stop uploading sensitive data to SaaS tools just to run a GROUP BY. It's a native C++ desktop app that opens 5GB+ CSV, JSONL, Parquet, and Excel files in about 3 seconds, then lets you query them with DuckDB's full SQL engine — JOINs, CTEs, window functions, all running on your machine.<p>The idea is simple: your laptop is a perfectly good analytics workstation. You shouldn't need a cloud pipeline to look at your data.<p>Some things I learned building it:<p>- DuckDB's columnar engine is absurdly efficient. 12M rows, sub-second queries, under 1 GB RAM. On hardware that fits in a backpack.<p>- ImGui + OpenGL is a great stack for data-heavy desktop apps. No DOM, no layout engine overhead — just raw GPU rendering. The data grid scrolls 12M rows without a single frame drop.<p>- I added a "3D City View" that maps rows to buildings (height = one column, color = another). Sounds gimmicky, but outliers and clusters are immediately visible in ways they aren't in tables or charts. Our brains are good at spotting the tall building in a skyline.<p>- Lua scripting turned out more useful than expected. People write small scripts to fetch data from APIs, run queries, and configure charts — repeatable analysis without leaving the app.<p>- Everything runs locally. Zero telemetry, zero network calls. The binary is 33MB, statically linked.<p>Free download at <a href="https://columnlens.com" rel="nofollow">https://columnlens.com</a><p>Would love to hear from anyone else building local-first data tools — I think the "ship everything to the cloud" era is starting to swing back.