Skip to content

Instantly share code, notes, and snippets.

View wubx's full-sized avatar

wubx wubx

  • Databend Labs
  • Singapore
  • 14:47 (UTC +08:00)
  • X @wubx
View GitHub Profile
@wubx
wubx / gist-snowflake-minmax.md
Last active July 27, 2026 00:59
How long is Snowflake's string min/max? ~32 bytes undocumented (measured on 10.25.101)
CREATE OR REPLACE TABLE probe_kK (s VARCHAR) AS
SELECT REPEAT('A', K-1) || TO_CHAR(SEQ8())
FROM TABLE(GENERATOR(ROWCOUNT => 500000000))
ORDER BY 1;   
SET probe = (SELECT s FROM probe_kK SAMPLE (1 ROWS));
SELECT COUNT(*) FROM probe_kK WHERE s = $probe;