• Bhushan Kulkarni (4/25/2016)


    Staging tables can be heap apart from tables storing configuration data which is very less in size.

    I once saw a configuration data table which was occupying > 6GB space on disk.

    That was quite strange, because there were a couple of dozens of records in that table.

    Then I noticed that the table was a HEAP, so in order to reorganise its pages I need to add a clustered index.

    As soon as I did that the table size dropped to ~30kB, and any further action became unnecessary.

    Tables should be allowed to stay HEAPs only if they are dropped and recreated on a regular basis.

    _____________
    Code for TallyGenerator