If using a structured display format such as 'csv' then records are stored until the record header changes. At which point the table is flushed to output.
Alternative would be to store all records indexed by header content and then print once all command responses are received. This would minimise number of tables and ensure that like rows are grouped together into the smallest set of common tables.