File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 11BEGIN ;
22
3- ALTER TABLE chain .transactions ADD COLUMN gas_used UINT_NUMERIC;
4- ALTER TABLE chain .blocks
5- ADD COLUMN size UINT_NUMERIC,
6- ADD COLUMN gas_used UINT_NUMERIC;
3+ -- NOTE: We intentionally use NUMERIC(1000,0) instead of the uint_numeric domain.
4+ -- Adding a domain-typed column on these large tables caused a table rewrite
5+ -- (DataFileRead for hours) due to domain constraint plumbing being applied to
6+ -- every partition/chunk. Using the base type + NULLable column avoids the rewrite
7+ -- and is metadata-only (fast).
8+ ALTER TABLE chain .transactions ADD COLUMN gas_used NUMERIC (1000 ,0 ) NULL ;
9+
10+ ALTER TABLE chain .blocks ADD COLUMN size NUMERIC (1000 ,0 ) NULL ;
11+ ALTER TABLE chain .blocks ADD COLUMN gas_used NUMERIC (1000 ,0 ) NULL ;
712
813COMMIT ;
You can’t perform that action at this time.
0 commit comments