Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

deletes causing chokes

Posted on 2014-02-27
5
Medium Priority
?
126 Views
Last Modified: 2014-03-05
when you delete a huge quality of data, it sometimes takes long time.. or even makes the system unstable...

what is the term for this problem..?
0
Comment
Question by:25112
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 5

Author Comment

by:25112
ID: 39892953
is it the lack of index?
or too much log writing?
or shifting of data within the file etc?
0
 
LVL 11

Assisted Solution

by:John_Vidmar
John_Vidmar earned 500 total points
ID: 39892997
Probably your transaction-log table is getting a lot of activity... each DML is either explicitly (BEGIN TRAN) or implicitly contained in a transaction, which populates transaction-log.  If the statement aborts then transaction-log is cleared of those transactions, otherwise, they are committed (eventually) to disk.
0
 
LVL 66

Assisted Solution

by:Jim Horn
Jim Horn earned 500 total points
ID: 39893140
Any chance you can DELETE a set number of rows at a time, say 50,000, so that it's not one large transaction (per above experts)?

>when you delete a huge quality of data
Define this.  Is it the entire table, or can it be defined in a WHERE clause?
0
 
LVL 40

Assisted Solution

by:lcohan
lcohan earned 500 total points
ID: 39893162
Do the tables involved in DELETEs have FKeys? Or CLUSTERED indexes?
If FKEys exists make sure you have a NONCLUSTER index to cover the FKey structure to help the deletes.
I also suggest adding WITH (ROWLOCK) hint and maybe batch them using SET @@ROWCOUNT or some other method.
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 500 total points
ID: 39893663
what is the term for this problem..?
Painful ?

But seriously, define large.  If it is more than say 500K consider breaking it up in batches.
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question