January 4, 2012 at 3:17 am
Hi all,
I have 1 TB data in my database & I have only one table in my database
where more than 10 lacs data are available.
When i am going to insert single row in table then it's taking lot of time approx 7 minutes. How i can resolve this issue.
Please guide me with step by step.
Regards,
Sachin.
January 4, 2012 at 3:27 am
Sounds to me like an unindexed foreign key lookup, trigger activity, blocking or indexed views.
Take a look at the plan and the active processes to see if you are being blocked.
I think most of these can be discounted as you only have one table, but that in itself sounds as if the design is wrong.
Dave
January 4, 2012 at 5:24 am
kumar.sachu08 (1/4/2012)
Hi all,I have 1 TB data in my database & I have only one table in my database
where more than 10 lacs data are available.
When i am going to insert single row in table then it's taking lot of time approx 7 minutes. How i can resolve this issue.
Please guide me with step by step.
Regards,
Sachin.
I agree with Dave. It sounds like it could be a bad design. Heh... either that or it's CDRs (Call Detail Records) from a telephone company. π
Chances are, if you have such a table, you also have a pot-wad of indexes. Inserts will affect ALL indexes and could cause many of them to split either at the page level or the extent level. Updating all of those indexes (especially when the splits occur) can take a huge amount of time.
My recommendation, if you can't redesign the table, is to do a serious reevalution of the indexes and see if some of them can be combined to support a core set of queries and removed, if not. Part of your investigation should include a FILL FACTOR study to help keep the splits down to a reasonable level.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 4, 2012 at 5:58 am
Them's big rows. Can you post the CREATE TABLE script?
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
January 4, 2012 at 7:10 am
ChrisM@home (1/4/2012)
Them's big rows. Can you post the CREATE TABLE script?
+1
I am expecting few blob columns. Itβs the only thing I can think of at the moment that can justify 10 lacs (1,000,000) records with 1 TB data reasonably.
January 4, 2012 at 7:16 am
Dev (1/4/2012)
I am expecting few blob columns. Itβs the only thing I can think of at the moment that can justify 10 lacs (1,000,000) records with 1 TB data reasonably.
Im hoping for
ID integer PK identity
Data XML not null
π
January 4, 2012 at 11:25 pm
Actually In interview someone ask me, Suppose you have 6 TB Database in which you have so many tables (approx 70) but one table like "abc" contain more than 15 Lacs records.
When we are going to insert a record in this "abc" table then it's taking lot of time approx 10 minutes.
Then what's step you should take to minimize the record insertion time.
Please guide me step by step.
Regards,
Sachin.
January 4, 2012 at 11:48 pm
TBH , the problem solving skills that you would have to demonstrate would be an integral part of a DBA role.
If you are going for a DBA role , then you *should* know this.
If you dont , and your prospective employer needs your to, its the wrong job for you right now , sorry.
January 5, 2012 at 12:23 am
I know i am fresher....and i am giving interview......i have only 1 years of experience.
then what should i do....when any interviewer asking like such type of question ?
Should i left the interview without attempting or i am not right person to know all the question answer ?
I am getting the problem to find out answer from itself. That's why I raging question.
If you understand fresher should not required such type of question answer then who will suggest interview don't ask such type of question with fresher.
Thanks.
January 5, 2012 at 2:23 am
Then the best answer is :
"I dont know, but i would start to find out how to by........"
I dont know , is valid answer to any question. The 'but' follow on is valuable to an employer to see what you problem solving potential would be. Nobody knows it all. Perhaps the only bad answer would be : but i would post a question on SSC and wait for an answer.
Where would you go to find information ?
January 5, 2012 at 2:45 am
kumar.sachu08 (1/5/2012)
I know i am fresher....and i am giving interview......i have only 1 years of experience.then what should i do....when any interviewer asking like such type of question ?
Should i left the interview without attempting or i am not right person to know all the question answer ?
I am getting the problem to find out answer from itself. That's why I raging question.
If you understand fresher should not required such type of question answer then who will suggest interview don't ask such type of question with fresher.
Thanks.
kumar.sachu08 (1/4/2012)
Hi,Can we implement Clustered Index on Unique key ? If no... why ?
Regards,
Sachin.
Stay in your current position and consolidate your knowledge for a year or two.
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
January 5, 2012 at 2:51 am
kumar.sachu08 (1/4/2012)
Hi all,When i am going to insert single row in table then it's taking lot of time approx 7 minutes.
Has this always been the case or has it just started happening? Have you tried to Profiler the insert?
_________________________________________________________________________________SQLGeordieWeb:- Jarrin ConsultancyBlog:- www.chrisjarrintaylor.co.ukTwitter:- @SQLGeordie
January 5, 2012 at 2:57 am
Hi Gail Shaw ,
Expect answer from your side.
Thanks in advance.
January 5, 2012 at 4:03 am
Gail is one of the best, but what makes you think that her advice would be different from ours ?
Is you interview answer now going to be 'ill ask Gail Shaw' ?
We are all unpaid volunteers here, we have tried our best to help you but since you dont want that ...bye.....
January 5, 2012 at 4:10 am
Dave Ballantyne (1/4/2012)
Sounds to me like an unindexed foreign key lookup, trigger activity, blocking or indexed views.Take a look at the plan and the active processes to see if you are being blocked.
I think most of these can be discounted as you only have one table, but that in itself sounds as if the design is wrong.
Dave
Actually, Dave Gave you the answer in his very first post. you should have a mental checklist for slow inserts that includes that list, because there's no one answer.
it would require an investigation as to WHY it was slow. Dave mentioned unindexed foreign key lookup, trigger activity, blocking or indexed views; all those things could be reviewed, one item at a time, to determine if it is having the impact.
you would probably want to start by looking at the execution plan of the slow insert first.
Lowell
Viewing 15 posts - 1 through 15 (of 27 total)
You must be logged in to reply to this topic. Login to reply