Посмотреть количество записей в таблицах
Материал из wiki.standart-n.ru
Нужно установить и выполнить следующую процедуру:
SET TERM ^ ; create or alter procedure PR_GET_COUNT_TABLE_RECORDS returns ( NAME DM_TEXT, S DM_ID) as begin for select r.rdb$relation_name from rdb$relations r where 1=1 and r.rdb$relation_name not starting with 'VW_' and r.rdb$relation_name not starting with 'RDB$' and r.rdb$relation_name not starting with 'MON$' order by r.rdb$relation_name asc into :name do begin EXECUTE STATEMENT 'SELECT count(*) FROM ' || :name || ' ' INTO :s; suspend; end end^ SET TERM ; ^ /* Existing privileges on this procedure */ GRANT EXECUTE ON PROCEDURE PR_GET_COUNT_TABLE_RECORDS TO SYSDBA;