performance

  • Hi,

    I want to delete records from a table which contains huge records.Is there any solution to delete it in less time.If I am using rowcount then also it takes a lot of time as billion records are present in that table.

    Is there any way to this.

    Regards.

    Sunanda

  • How many rows do you need to delete, how many rows are you keeping?

    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
  • I want to cleanup the table.As per my application we need to cleanup the table when the database size is increased.

  • GilaMonster (12/29/2008)


    How many rows do you need to delete, how many rows are you keeping?

    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
  • sunandas (12/30/2008)


    I want to cleanup the table.As per my application we need to cleanup the table when the database size is increased.

    Does this mean you don't need any of the rows? If so truncate table will work. If not, please answer Gail's question?

  • Around 30000000 records are there in the table.I cant use TRUNCATE as its index will also removed(though I can recreate it again).

    So any other option.

  • sunandas (12/30/2008)


    Around 30000000 records are there in the table.

    And you want to remove all of them?

    I cant use TRUNCATE as its index will also removed(though I can recreate it again).

    Truncate doesn't remove indexes.

    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 7 posts - 1 through 6 (of 6 total)

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