SpacetimeDB icon indicating copy to clipboard operation
SpacetimeDB copied to clipboard

Store table row size in system table

Open joshua-spacetime opened this issue 1 year ago • 3 comments

Ideally this would be a column in st_table, but I don't think we want to change the schema of st_table. It could also be a view over st_columns, but in that case we'd need to add an index to st_columns. The fastest, in terms of deriving the row size, is probably just to store it in a new system table. Perhaps the same one as https://github.com/clockworklabs/SpacetimeDB/issues/1158.

joshua-spacetime avatar Apr 26 '24 00:04 joshua-spacetime

NOTE: This is presumably only the fixed len portion of the row?

cloutiertyler avatar Apr 29 '24 19:04 cloutiertyler

Should we have ST_STATS for storing row size, row count, etc about a table?

Shubham8287 avatar Apr 30 '24 20:04 Shubham8287

NOTE: This is presumably only the fixed len portion of the row?

Correct, specifically the BFLATN size.

Should we have ST_STATS for storing row size, row count, etc about a table?

Yes I think so.

joshua-spacetime avatar Apr 30 '24 21:04 joshua-spacetime