Export to CSV, JSON and XLSX from the Neon console
Neon's SQL Editor can now export query results to CSV, JSON and native XLSX, all generated client-side in JavaScript from results the browser already holds. CSV and JSON needed care to keep Postgres int8 and decimal values out of JavaScript numbers and to avoid duplicate JSON keys. XLSX required handling Excel's day-zero epoch and 1900 leap-year bug, and its non-base-26 column lettering. Zip files are built by repackaging GZIP output from the browser's CompressionStream API, which shares the DEFLATE data and CRC with Zip. The work is released as two small npm libraries, littlezipper (under 2KB) and xlsxtable.
Related posts
- @neondatabase/serverless hits 1.0.0
Neon mediumAdept
Neon's JavaScript/TypeScript serverless driver, which carries Postgres queries over HTTP and WebSockets for environments without raw TCP such as V8 isolates and browsers, reaches 1.0.0 after a refactor that adds auto-generated types via api-extractor and CI tests across Node, Bun, Deno, browsers, Cloudflare Workers, Vercel and the Prisma/Drizzle adapters. Tagged-template queries are now composable, because placeholder numbering is deferred until execution. A breaking change makes calling sql(...) as a plain function an error, since that form used ordinary string interpolation and invited SQL injection. New sql.query and sql.unsafe helpers cover the parameterized and trusted-raw-SQL cases. Binary inserts over HTTP now hex-encode roughly 10x faster, though WebSockets remain the recommended path for large blobs.
- The world’s fastest tool for querying JSON files
ClickHouse easyNovice
clickhouse-local, a single-binary SQL engine for local and remote files, outperforms SPySQL, jq, trdsql, Miller, OctoSQL, spark-sql, Pandas and DSQ when querying large JSON files in the SPySQL benchmark on Amazon book reviews data. The benchmark covers map (computed column over all rows), aggregation (column average) and filter (first 100 matching rows) tasks, and OctoSQL is faster on smaller files. Schema inference and semi-structured data support make the queries simple to write. Caveats: each query runs only once, results vary by hardware, and the filter test favors tools that stop early on LIMIT without loading the whole file.
- The billion docs JSON Challenge: ClickHouse vs. MongoDB, Elasticsearch, and more
ClickHouse mediumAdept
JSONBench is a reproducible benchmark that loads up to one billion Bluesky event JSON documents into ClickHouse, MongoDB, Elasticsearch, DuckDB and PostgreSQL, then measures storage size and the speed of five analytical queries. ClickHouse's columnar JSON type stores each JSON path as a separate compressed column. In these tests it used 40% less storage and ran aggregations 2500x faster than MongoDB, used half the storage and ran 10x faster than Elasticsearch, and was several thousand times faster than DuckDB and PostgreSQL while using 5-6x less disk. The write-up explains each system's JSON storage model, compression, sorting, indexes and caches, and how each was configured for a fair comparison, such as MongoDB covered index scans and Elasticsearch with _source disabled.
- ClickHouse Release 23.9
ClickHouse mediumAdept
ClickHouse 23.9 ships 20 new features, 19 performance optimisations and 55 bug fixes, highlighted by JSON schema type inference, a GCD compression codec and SSH key authentication. Type inference derives nested Tuple schemas from well-structured JSON by sampling the first 25k rows or 32MB, but it ignores columns that appear after the sample and rejects inconsistent types for the same path. The GCD codec divides each block's values by their greatest common divisor before Delta/ZSTD. On an 11-billion-row Forex dataset it cut compressed Decimal column size by 38% with oversized precision and about 20% even with optimal precision. Users can now authenticate with SSH keys configured in YAML or via DDL instead of passwords.
- What's New in pg_clickhouse - JSONB Support, SQL value functions, Streaming, and more
ClickHouse mediumAdept
pg_clickhouse, the Postgres foreign data wrapper for querying ClickHouse, now pushes down far more operations to ClickHouse. JSONB accessors (->, ->>, jsonb_extract_path) are translated to ClickHouse sub-column syntax. CURRENT_DATE, CURRENT_TIMESTAMP and clock_timestamp() are translated to ClickHouse now()/now64()/nowInBlock64 calls that use the Postgres session time zone and timestamp precision. Array functions now map to their ClickHouse equivalents. Streaming of HTTP driver results in roughly 50MB batches kept container memory under about 100MiB during a full NYC taxi table scan, versus about 600MiB without it.