clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 1044308 fiddles created (9408 in the last week).

create table demo as with q as (select 42 x union all select 42) select 42 x from q a cross join q b cross join q c cross join q d cross join q e cross join q f cross join q g cross join q h cross join q i cross join q j cross join q k cross join q l cross join q m cross join q n cross join q o cross join q p cross join q r cross join q s cross join q t cross join q u
 hidden batch(es)


select round(data_length/1024/1024) from information_schema.tables where table_name='demo'
round(data_length/1024/1024)
32
 hidden batch(es)


-- adding a column does not add space :) alter table demo add column b numeric ;
 hidden batch(es)


select round(data_length/1024/1024) from information_schema.tables where table_name='demo'
round(data_length/1024/1024)
32
 hidden batch(es)


-- even with a default value in it :)) alter table demo add c numeric default 42 not null;
 hidden batch(es)


analyze table demo;select round(data_length/1024/1024) from information_schema.tables where table_name='demo'
Table Op Msg_type Msg_text
db_1009719524.demo analyze status OK
round(data_length/1024/1024)
32
 hidden batch(es)


-- proof that table would grow if it updates the rows update demo set b=42
 hidden batch(es)


analyze table demo;select round(data_length/1024/1024) from information_schema.tables where table_name='demo'
Table Op Msg_type Msg_text
db_1009719524.demo analyze status OK
round(data_length/1024/1024)
71
 hidden batch(es)