Index filled after created

  • If you have a table that is already populated (say 900,000 rows) and then you create an index, is the index automatically filled at that point?

    Thanks,

    Tom

  • An index stays in synch with the table it's on. If the table already had rows in it when you create the index, then that index will have the rows in it also. When you do an INSERT into the table later, the rows will be automatically added to the index as well.

  • That was what I thought, but wasn't sure.

    Thanks,

    Tom

  • tshad (3/4/2013)


    That was what I thought, but wasn't sure.

    Thanks,

    Tom

    At this point, I recommend you press the {f1} key when you're in SSMS and use the "index" to find information about "indexes". This isn't something that should be done without proper prior knowledge.

    --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)

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply