Click here to Skip to main content
11,573,084 members (68,609 online)
   

Database

 
AnswerRe: Having a bad SQL day Pin
Shameel13-Feb-13 0:53
memberShameel13-Feb-13 0:53 
GeneralRe: Having a bad SQL day Pin
Jörgen Andersson13-Feb-13 0:56
memberJörgen Andersson13-Feb-13 0:56 
GeneralRe: Having a bad SQL day Pin
PIEBALDconsult13-Feb-13 4:01
memberPIEBALDconsult13-Feb-13 4:01 
GeneralRe: Having a bad SQL day Pin
Jörgen Andersson13-Feb-13 6:27
memberJörgen Andersson13-Feb-13 6:27 
QuestionWhat is Ado.net Pin
Himanshu Sharma 88812-Feb-13 19:20
memberHimanshu Sharma 88812-Feb-13 19:20 
AnswerRe: What is Ado.net Pin
Richard MacCutchan12-Feb-13 22:31
mvpRichard MacCutchan12-Feb-13 22:31 
GeneralRe: What is Ado.net Pin
Shameel13-Feb-13 0:44
memberShameel13-Feb-13 0:44 
GeneralRe: What is Ado.net Pin
Thomas Gabriel20-Feb-13 22:42
memberThomas Gabriel20-Feb-13 22:42 
AnswerRe: What is Ado.net Pin
Sandeep Mewara13-Feb-13 0:23
mvpSandeep Mewara13-Feb-13 0:23 
QuestionSQL 2008 Truncate vs Delete Pin
mrfalk12-Feb-13 6:47
membermrfalk12-Feb-13 6:47 
AnswerRe: SQL 2008 Truncate vs Delete Pin
Eddy Vluggen12-Feb-13 7:48
mvpEddy Vluggen12-Feb-13 7:48 
GeneralRe: SQL 2008 Truncate vs Delete Pin
mrfalk12-Feb-13 8:27
membermrfalk12-Feb-13 8:27 
GeneralRe: SQL 2008 Truncate vs Delete Pin
Eddy Vluggen12-Feb-13 8:36
mvpEddy Vluggen12-Feb-13 8:36 
GeneralRe: SQL 2008 Truncate vs Delete Pin
Khorshed Alam, Dhaka18-Feb-13 18:09
memberKhorshed Alam, Dhaka18-Feb-13 18:09 
Truncate statement:
1. Deletion is very faster. Almost no (very minimal) transaction log is produced during this operation.
2. Data pages which are used by the table are de allocated for further use by SQL Server in other operations.
3. Identity column value is reset from its original default position. For example if a table has an identity column and identity value start form 1 then after running truncate command the value start incrementing back from 1.
4. As wiping out rows are very faster, so the number of locks are low. Although during TRUNCATE operation table and page lock happens but not each row.
5. TRUNCATE TABLE command does not support where clause, it also does not works if foreign key exists in the table. In addition, table participates in log shipping or replication also does not honor TRUNCATE table command.
6. Records removed by the TRUNCATE COMMAND cannot be restored even though the database recovery model is set to FULL.
7. TRUNCATE statement also does not fire triggers.
DELETE Statement:
1. The DELETE statement removes rows one at a time. For each deleted row the operation writes an entry in the transaction log.
2. DELETE operation is more resource intensive thus consumes more database resources and locks.
3. Where clause can be included with the statement to restrict the number of affected rows.
4. Internally the DELETE operation does not cleanup rows immediately if the table has any index on it, The operation marks the affected rows "to be deleted". The marked records are known as GHOST RECORDS. Although these records are de allocated quickly by a background cleanup process for better performance.
dsdf

AnswerRe: SQL 2008 Truncate vs Delete Pin
NickPace12-Feb-13 10:09
memberNickPace12-Feb-13 10:09 
AnswerRe: SQL 2008 Truncate vs Delete Pin
djj5513-Feb-13 3:59
memberdjj5513-Feb-13 3:59 
AnswerRe: SQL 2008 Truncate vs Delete Pin
gvprabu20-Feb-13 21:37
membergvprabu20-Feb-13 21:37 
QuestionSQL Server 2008 Pin
VishwaKL10-Feb-13 17:51
memberVishwaKL10-Feb-13 17:51 
AnswerRe: SQL Server 2008 Pin
Shameel10-Feb-13 22:33
memberShameel10-Feb-13 22:33 
AnswerRe: SQL Server 2008 Pin
jschell11-Feb-13 8:20
memberjschell11-Feb-13 8:20 
Questionupdate values in a table in single query Pin
nainakarri7-Feb-13 20:07
membernainakarri7-Feb-13 20:07 
AnswerRe: update values in a table in single query Pin
Mycroft Holmes7-Feb-13 21:00
memberMycroft Holmes7-Feb-13 21:00 
GeneralRe: update values in a table in single query Pin
Shameel10-Feb-13 22:38
memberShameel10-Feb-13 22:38 
GeneralRe: update values in a table in single query Pin
Mycroft Holmes11-Feb-13 13:30
memberMycroft Holmes11-Feb-13 13:30 
AnswerRe: update values in a table in single query Pin
Eddy Vluggen7-Feb-13 22:42
mvpEddy Vluggen7-Feb-13 22:42 
GeneralRe: update values in a table in single query Pin
gvprabu10-Feb-13 18:02
membergvprabu10-Feb-13 18:02 
AnswerRe: update values in a table in single query Pin
gvprabu20-Feb-13 21:43
membergvprabu20-Feb-13 21:43 
QuestionIs it possible to print a variable in stored procedure Pin
Deepthi.214567-Feb-13 19:45
memberDeepthi.214567-Feb-13 19:45 
AnswerRe: Is it possible to print a variable in stored procedure Pin
nainakarri7-Feb-13 20:22
membernainakarri7-Feb-13 20:22 
GeneralRe: Is it possible to print a variable in stored procedure Pin
vanikanc12-Feb-13 8:19
membervanikanc12-Feb-13 8:19 
QuestionVisual Studio 2005 Access 2010 Database Pin
Member 98194707-Feb-13 12:06
memberMember 98194707-Feb-13 12:06 
AnswerRe: Visual Studio 2005 Access 2010 Database Pin
Mycroft Holmes7-Feb-13 13:45
memberMycroft Holmes7-Feb-13 13:45 
QuestionSimulate transaction: non blocking insert / update Pin
Bob Stanneveld7-Feb-13 11:12
memberBob Stanneveld7-Feb-13 11:12 
AnswerRe: Simulate transaction: non blocking insert / update Pin
Mycroft Holmes7-Feb-13 13:44
memberMycroft Holmes7-Feb-13 13:44 
QuestionPropagating a MySQL transaction with MSMQ II Pin
Ger Hayden6-Feb-13 8:08
memberGer Hayden6-Feb-13 8:08 
QuestionMissing Data in an Access Report Pin
Vuyiswa Maseko6-Feb-13 3:03
memberVuyiswa Maseko6-Feb-13 3:03 
AnswerRe: Missing Data in an Access Report Pin
jschell6-Feb-13 8:11
memberjschell6-Feb-13 8:11 
GeneralRe: Missing Data in an Access Report Pin
Vuyiswa Maseko6-Feb-13 19:01
memberVuyiswa Maseko6-Feb-13 19:01 
GeneralRe: Missing Data in an Access Report Pin
jschell7-Feb-13 9:52
memberjschell7-Feb-13 9:52 
AnswerRe: Missing Data in an Access Report Pin
Mycroft Holmes6-Feb-13 12:27
memberMycroft Holmes6-Feb-13 12:27 
GeneralRe: Missing Data in an Access Report Pin
Vuyiswa Maseko6-Feb-13 19:06
memberVuyiswa Maseko6-Feb-13 19:06 
GeneralRe: Missing Data in an Access Report Pin
Mycroft Holmes6-Feb-13 20:27
memberMycroft Holmes6-Feb-13 20:27 
GeneralRe: Missing Data in an Access Report Pin
Vuyiswa Maseko6-Feb-13 20:32
memberVuyiswa Maseko6-Feb-13 20:32 
GeneralRe: Missing Data in an Access Report Pin
jschell7-Feb-13 9:56
memberjschell7-Feb-13 9:56 
Questionoracle error with winserver2008 Pin
fares35-Feb-13 1:03
memberfares35-Feb-13 1:03 
AnswerRe: oracle error with winserver2008 Pin
Bernhard Hiller5-Feb-13 4:57
memberBernhard Hiller5-Feb-13 4:57 
Questionchar(255) vs varchar(255) vs varchar(MAX) Pin
devvvy1-Feb-13 18:22
memberdevvvy1-Feb-13 18:22 
AnswerRe: char(255) vs varchar(255) vs varchar(MAX) Pin
Richard MacCutchan1-Feb-13 23:07
mvpRichard MacCutchan1-Feb-13 23:07 
GeneralRe: char(255) vs varchar(255) vs varchar(MAX) Pin
devvvy2-Feb-13 15:39
memberdevvvy2-Feb-13 15:39 
AnswerRe: char(255) vs varchar(255) vs varchar(MAX) Pin
PIEBALDconsult2-Feb-13 5:22
memberPIEBALDconsult2-Feb-13 5:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.150624.2 | Last Updated 2 Jul 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid