Click here to Skip to main content
15,914,374 members
Home / Discussions / Database
   

Database

 
GeneralRe: Older generation SQL syntax - Oracle Pin
vanikanc13-Feb-13 10:37
vanikanc13-Feb-13 10:37 
AnswerRe: Older generation SQL syntax - Oracle Pin
Shameel15-Feb-13 4:17
professionalShameel15-Feb-13 4:17 
QuestionHaving a bad SQL day Pin
TheComputerMan12-Feb-13 23:40
TheComputerMan12-Feb-13 23:40 
AnswerRe: Having a bad SQL day Pin
Jörgen Andersson13-Feb-13 0:20
professionalJörgen Andersson13-Feb-13 0:20 
GeneralRe: Having a bad SQL day Pin
TheComputerMan13-Feb-13 0:32
TheComputerMan13-Feb-13 0:32 
GeneralRe: Having a bad SQL day Pin
Jörgen Andersson13-Feb-13 0:40
professionalJörgen Andersson13-Feb-13 0:40 
GeneralRe: Having a bad SQL day Pin
Bernhard Hiller13-Feb-13 3:24
Bernhard Hiller13-Feb-13 3:24 
GeneralRe: Having a bad SQL day Pin
TheComputerMan13-Feb-13 3:33
TheComputerMan13-Feb-13 3:33 
AnswerRe: Having a bad SQL day Pin
Shameel13-Feb-13 0:53
professionalShameel13-Feb-13 0:53 
GeneralRe: Having a bad SQL day Pin
Jörgen Andersson13-Feb-13 0:56
professionalJörgen Andersson13-Feb-13 0:56 
GeneralRe: Having a bad SQL day Pin
PIEBALDconsult13-Feb-13 4:01
mvePIEBALDconsult13-Feb-13 4:01 
GeneralRe: Having a bad SQL day Pin
Jörgen Andersson13-Feb-13 6:27
professionalJörgen Andersson13-Feb-13 6:27 
QuestionWhat is Ado.net Pin
Himanshu Sharma 88812-Feb-13 19:20
Himanshu Sharma 88812-Feb-13 19:20 
AnswerRe: What is Ado.net Pin
Richard MacCutchan12-Feb-13 22:31
mveRichard MacCutchan12-Feb-13 22:31 
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 

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.