Work out row size estimate instantly with clear inputs, formula shown and shareable results.
Row size is the sum of column widths plus a header and null bitmap, rounded up to an alignment boundary. Rows per page follows directly, and that is the number that determines scan cost: halving row size doubles rows per page and therefore halves the pages a full scan must read.
Row size
data = 4 x int columns + 8 x bigint columns + text bytes; total = data + header + alignment padding; rows per page = floor((page size - page header) / row size)
In PostgreSQL yes. Placing wider fixed-width types first reduces alignment padding, occasionally saving several bytes per row across billions of rows.
They are moved out of line — TOAST in PostgreSQL, overflow pages in InnoDB — so the row itself stays small but reading that column costs an extra fetch.