SQL Server Efficiently dropping a group of rows with millions and millions of rows

前端 未结 13 554
遇见更好的自我
遇见更好的自我 2021-02-04 12:26

I recently asked this question: MS SQL share identity seed amongst tables (Many people wondered why)

I have the following layout of a table:

Table: Star

13条回答
  •  清歌不尽
    2021-02-04 13:16

    Having separate tables is partitioning - you are just managing it manually and do not get any management assistance or unified access (without a view or partitioned view).

    Is the cost of Enterprise Edition more expensive than the cost of separately building and maintaining a partitioning scheme?

    Alternatives to the long-running delete also include populating a replacement table with identical schema and simply excluding the rows to be deleted and then swapping the table out with sp_rename.

    I'm not understanding why whole categories of stars are being deleted on a regular basis? Presumably you are having new categories created all the time, which means your number of categories must be huge and partitioning on (manually or not) that would be very intensive.

提交回复
热议问题