由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - delete
相关主题
How to delete 40 millions records in a 400 millions indexed table fast?再问I/O WAIT的问题
问个基础的理论问题----数据库的基本差异Oracle 请问怎么删除一个实时都在更新的表里的历史数据
which one is faster? truncate or delete?partition 表
INSERT or UPDATE, which is faster?请问XML还有前途么?
Oracle求助,thanks!!!truncate和delete在ORACLE里有什么区别?
Re: Is there any easy way to truncate the LDF file of SQL SERVER?如何让SQL 2005 CLR Trigger返回结果给Stored Procedure用?
Truncation error import csv file to SQL table新手一问,关于delete和truncate table
Database Interview QuestionsRe: 菜人问问,你们都在database上干什么?? (转载)
相关话题的讨论汇总
话题: delete话题: data话题: partition话题: 删除话题: maybe
进入Database版参与讨论
1 (共1页)
k***e
发帖数: 7933
1
MS SQL server。
如果有个表经常要大量加入数据,大量删除数据,
是不是应该把删除的记录做个删除标记,然后每个
月做一次真正的数据删除?
还是应该有别的更好的办法?
I******e
发帖数: 101
2
depending on whether ms is doing deferred delete. most dbms are doing it.
x***e
发帖数: 2449
3
delete is faster than mark to be deleted(update)
it really depends on how much data total and how much data need to be
deleted
and idnex.
if you have some more detail, maybe we can take a look.

【在 k***e 的大作中提到】
: MS SQL server。
: 如果有个表经常要大量加入数据,大量删除数据,
: 是不是应该把删除的记录做个删除标记,然后每个
: 月做一次真正的数据删除?
: 还是应该有别的更好的办法?

e*u
发帖数: 17
4
Maybe you can try partition switch
go look at "Transferring Data Efficiently by Using Partition Switching " on
book online

【在 k***e 的大作中提到】
: MS SQL server。
: 如果有个表经常要大量加入数据,大量删除数据,
: 是不是应该把删除的记录做个删除标记,然后每个
: 月做一次真正的数据删除?
: 还是应该有别的更好的办法?

a*******t
发帖数: 891
5
what is your concern? speed, impact of production server?
if you don't need to keep the operation in tranlog, use truncate to make it
run faster.
and make sure you don't have clustered index if you don't need them

【在 k***e 的大作中提到】
: MS SQL server。
: 如果有个表经常要大量加入数据,大量删除数据,
: 是不是应该把删除的记录做个删除标记,然后每个
: 月做一次真正的数据删除?
: 还是应该有别的更好的办法?

1 (共1页)
进入Database版参与讨论
相关主题
Re: 菜人问问,你们都在database上干什么?? (转载)Oracle求助,thanks!!!
什么时候不用索引Re: Is there any easy way to truncate the LDF file of SQL SERVER?
用Servlet显示数据库里的数据,分页的? (很实际的问题)Truncation error import csv file to SQL table
mysql challengeDatabase Interview Questions
How to delete 40 millions records in a 400 millions indexed table fast?再问I/O WAIT的问题
问个基础的理论问题----数据库的基本差异Oracle 请问怎么删除一个实时都在更新的表里的历史数据
which one is faster? truncate or delete?partition 表
INSERT or UPDATE, which is faster?请问XML还有前途么?
相关话题的讨论汇总
话题: delete话题: data话题: partition话题: 删除话题: maybe