I created a table with default symbol capacity from ILP and I couldn't specify the capacity of the symbol/tag column when I sent the data. When I inspect the table I see that column node
has the default capacity of 256.
CREATE TABLE IF NOT EXISTS table_raw (
node symbol,
timestamp timestamp,
value double
) TIMESTAMP(timestamp)
PARTITION BY
DAY DEDUP UPSERT KEYS (node, timestamp);
Given that this column has nearly 1 million distinct values, how can I increase the symbol capacity? Is there a way to not re-write the whole table since it's quite big now, nearly a billion rows?
I created a table with default symbol capacity from ILP and I couldn't specify the capacity of the symbol/tag column when I sent the data. When I inspect the table I see that column node
has the default capacity of 256.
CREATE TABLE IF NOT EXISTS table_raw (
node symbol,
timestamp timestamp,
value double
) TIMESTAMP(timestamp)
PARTITION BY
DAY DEDUP UPSERT KEYS (node, timestamp);
Given that this column has nearly 1 million distinct values, how can I increase the symbol capacity? Is there a way to not re-write the whole table since it's quite big now, nearly a billion rows?
Share Improve this question asked Jan 20 at 10:57 Nick The GreekNick The Greek 4532 silver badges6 bronze badges1 Answer
Reset to default 0As of v8.2.1 QuestDB does not support altering symbol capacity of the existing column. The only workaround to change the capacity without copying the whole table is to convert the column as varchar and then back to symbol of a higher capacity:
alter table tbl alter column sym type varchar;
alter table tbl alter column sym type symbol capacity 1000000 NOCACHE;