SELECT * FROM legacy_spans ORDER BY ts; +-------------------------+---------+----------------------------+ | ts | span_id | ts_end | +-------------------------+---------+----------------------------+ | 1970-01-01T00:00:00.001 | a1 | 1970-01-01T00:00:00.000001 | | 1970-01-01T00:00:00.002 | a2 | 1970-01-01T00:00:00.000002 | +-------------------------+---------+----------------------------+ CREATE TABLE encoded_spans ( ts TIMESTAMP TIME INDEX, span_id STRING COMPRESSION WITH (encoding = 'plain', page_size = '64KiB'), ts_end TIMESTAMP(9) COMPRESSION WITH (encoding = 'delta_binary_packed') ); Affected Rows: 0 INSERT INTO encoded_spans SELECT * FROM legacy_spans; Affected Rows: 2 ADMIN FLUSH_TABLE('encoded_spans'); +------------------------------------+ | ADMIN FLUSH_TABLE('encoded_spans') | +------------------------------------+ | 0 | +------------------------------------+ -- SQLNESS ARG restart=true SHOW CREATE TABLE encoded_spans; +---------------+---------------------------------------------------------------------------------------------------+ | Table | Create Table | +---------------+---------------------------------------------------------------------------------------------------+ | encoded_spans | CREATE TABLE IF NOT EXISTS "encoded_spans" ( | | | "ts" TIMESTAMP(3) NOT NULL, | | | "span_id" STRING NULL COMPRESSION WITH(encoding = 'plain', page_size = '64KiB', type = 'zstd'), | | | "ts_end" TIMESTAMP(9) NULL COMPRESSION WITH(encoding = 'delta_binary_packed', type = 'zstd'), | | | TIME INDEX ("ts") | | | ) | | | | | | ENGINE=mito | | | | +---------------+---------------------------------------------------------------------------------------------------+ INSERT INTO encoded_spans VALUES (3, 'b3', 3000); Affected Rows: 1 ADMIN FLUSH_TABLE('encoded_spans'); +------------------------------------+ | ADMIN FLUSH_TABLE('encoded_spans') | +------------------------------------+ | 0 | +------------------------------------+ SELECT * FROM encoded_spans ORDER BY ts; +-------------------------+---------+----------------------------+ | ts | span_id | ts_end | +-------------------------+---------+----------------------------+ | 1970-01-01T00:00:00.001 | a1 | 1970-01-01T00:00:00.000001 | | 1970-01-01T00:00:00.002 | a2 | 1970-01-01T00:00:00.000002 | | 1970-01-01T00:00:00.003 | b3 | 1970-01-01T00:00:00.000003 | +-------------------------+---------+----------------------------+