insert/bulk insert into a clustered index, how?

  • Im reading up on compression, and the article mentions that you can bulk insert into a clustered index.

    This does not make sense to me. AFAIK, you can have a heap, create a clustered index on that heap in a different FG to effectively move the table/heap.

    But this does not mean the new structure is just a clustered index. its still a table, albeit organized by a specific column(s).

    does the author mean to insert into a table With a clustered index, or can you actually insert data into a clustered index using some syntax im unaware of?

  • What does happen, is that if the table has a cluster and is not empty, BULK INSERT has to be fully logged, not minimally logged

    Edit: Misread. Thought it said bulk insert can't insert into a cluster

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • but does "insert into a clustered index" basically mean "insert into a table with a clustered index"?

    I dont know why he would specify to insert into a clustered index.

  • That's the only meaning I could think of, you can't insert into indexes, only into tables (or views sometimes).

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Cool, thanks for the confirmation. For a moment i wondered how i could be in the industry for a number of years and not know about inserting into indexes!

  • If you want to get technical, a table is either a heap or a clustered index. That's how it's organised, doesn't affect how it behaves (much)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 6 posts - 1 through 5 (of 5 total)

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