Editing TimeScale Notes
Revision as of 20:21, 7 April 2025 by Ian.readman (talk | contribs) (Created page with "== TimeScale Compression == Check Distinct Values --------------------- -- n_distinct (-1 = Unique, 1 = All The Same) SELECT tablename, attname, most_common_vals, most_common_freqs, n_distinct FROM pg_stats -- WHERE tablename = '<TableName>'; WHERE schemaname = '<SchemaName>'; == Compress Table == ALTER TABLE crypto_ticks SET (timescaledb.compress, timescaledb.compress_segmentby='symbol', timescaledb.compress_orderby='time DESC'); SELECT compress_chunk(...")
Warning: You are editing an out-of-date revision of this page.
If you publish it, any changes made since this revision will be lost.
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
Retrieved from "https://iandoob.net/index.php/TimeScale_Notes"