-->

DEVOPSZONES

  • Recent blogs

    How to get table total pages count in postgres

     To check number of pages do one of

    SELECT relpages FROM pg_class WHERE relname = 'my_table';
    

    or

    explain (analyse, buffers) select * from my_table;
    

    and check total numbers of buffers (hit+read)


    SELECT pg_relation_size('logs')/8192;
    ?column?
    ----------
    5322
    (1 row)

    No comments