Click here to Skip to main content
15,890,336 members
Home / Discussions / Database
   

Database

 
GeneralRe: What is Ado.net Pin
Shameel13-Feb-13 0:44
professionalShameel13-Feb-13 0:44 
GeneralRe: What is Ado.net Pin
Thomas Gabriel20-Feb-13 22:42
Thomas Gabriel20-Feb-13 22:42 
AnswerRe: What is Ado.net Pin
Sandeep Mewara13-Feb-13 0:23
mveSandeep Mewara13-Feb-13 0:23 
QuestionSQL 2008 Truncate vs Delete Pin
mrfalk12-Feb-13 6:47
mrfalk12-Feb-13 6:47 
AnswerRe: SQL 2008 Truncate vs Delete Pin
Eddy Vluggen12-Feb-13 7:48
professionalEddy Vluggen12-Feb-13 7:48 
GeneralRe: SQL 2008 Truncate vs Delete Pin
mrfalk12-Feb-13 8:27
mrfalk12-Feb-13 8:27 
GeneralRe: SQL 2008 Truncate vs Delete Pin
Eddy Vluggen12-Feb-13 8:36
professionalEddy Vluggen12-Feb-13 8:36 
GeneralRe: SQL 2008 Truncate vs Delete Pin
Khorshed Alam, Dhaka18-Feb-13 18:09
Khorshed 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
NickPace12-Feb-13 10:09 
AnswerRe: SQL 2008 Truncate vs Delete Pin
Corporal Agarn13-Feb-13 3:59
professionalCorporal Agarn13-Feb-13 3:59 
AnswerRe: SQL 2008 Truncate vs Delete Pin
gvprabu20-Feb-13 21:37
gvprabu20-Feb-13 21:37 
QuestionSQL Server 2008 Pin
VishwaKL10-Feb-13 17:51
VishwaKL10-Feb-13 17:51 
AnswerRe: SQL Server 2008 Pin
Shameel10-Feb-13 22:33
professionalShameel10-Feb-13 22:33 
AnswerRe: SQL Server 2008 Pin
jschell11-Feb-13 8:20
jschell11-Feb-13 8:20 
Questionupdate values in a table in single query Pin
nainakarri7-Feb-13 20:07
nainakarri7-Feb-13 20:07 
AnswerRe: update values in a table in single query Pin
Mycroft Holmes7-Feb-13 21:00
professionalMycroft Holmes7-Feb-13 21:00 
GeneralRe: update values in a table in single query Pin
Shameel10-Feb-13 22:38
professionalShameel10-Feb-13 22:38 
GeneralRe: update values in a table in single query Pin
Mycroft Holmes11-Feb-13 13:30
professionalMycroft Holmes11-Feb-13 13:30 
AnswerRe: update values in a table in single query PinPopular
Eddy Vluggen7-Feb-13 22:42
professionalEddy Vluggen7-Feb-13 22:42 
GeneralRe: update values in a table in single query Pin
gvprabu10-Feb-13 18:02
gvprabu10-Feb-13 18:02 
AnswerRe: update values in a table in single query Pin
gvprabu20-Feb-13 21:43
gvprabu20-Feb-13 21:43 
QuestionIs it possible to print a variable in stored procedure Pin
Deepthi.214567-Feb-13 19:45
Deepthi.214567-Feb-13 19:45 
AnswerRe: Is it possible to print a variable in stored procedure Pin
nainakarri7-Feb-13 20:22
nainakarri7-Feb-13 20:22 
GeneralRe: Is it possible to print a variable in stored procedure Pin
vanikanc12-Feb-13 8:19
vanikanc12-Feb-13 8:19 
QuestionVisual Studio 2005 Access 2010 Database Pin
Member 98194707-Feb-13 12:06
Member 98194707-Feb-13 12:06 

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

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