• tooba111 (12/5/2012)


    Hi Guys,

    Simple question but don't know the answer, In my database i have 99 table that don't have any rows. My question is, it would be good idea

    if i delete those table or leave it there. For Example, if i delete/remove these table, my users can see any application performance or not?

    I know they are not using space, but just wondering....

    Thank You.

    I don't care for rowless tables because they just clutter up the works especially when looking at tables through the Object Explorer of SSMS.

    That notwithstanding, I wouldn't delete any of the tables unless I knew for sure who owned them. I'd never delete 3rd party product tables because, like I said above, it could void a maintenance contract, support contract, or maybe even break code because their GUI interface may still have objects for those tables and you just haven't used (or purchased) certain functionality, yet.

    Even if the tables are from in-house applications, you could run into breaking code if you remove the tables.

    Even when I think I've clearly identified that a rowless table is a true orphan, I'll script out the table (including all keys, fks, indexes, constraints, triggers, extended properties, privs, etc, etc), send out multiple emails asking if anyone knows what it's used for (along with a message of my intent to eventually delete it), store that scripts in a revision control product such as SubVersion or SourceSafe, rename the table, and let it sit for two or three months waiting for the phone to ring. 2 days prior to deletion, I send out 4 emails over those two days. Two "intent to delete" emailsat the beginning of each day with a list of the tables to be deleted, an "intent to delete" an hour before I delete them along with a final warning, and a "here's what I deleted" message after the fact.

    I also tell people in that fourth email that if they want a deleted table to be restored after all of those warnings and the 3 month renaming period, that they should submit their request to reinstantiate each table on a separate $20 bill stapled to a paper bag with a #9 Jimmy John's sandwich, a Coke, and two Tylenol in the bag. 😛

    As a side bar, I suppose it is possible that you could see a bit of performance improvement in the app but only by removing or streamlining the objects that refer to such rowless tables. I don't believe that it would be worth it, though, except to have a cleaner and leaner app that might not require as much memory to operate.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)