Viewing 15 posts - 166 through 180 (of 309 total)
ss-457805 (5/19/2010)
In such a case, disabling the clustered index would keep that huge amount of disk overhead from occuring.
By disabling the clustered index, won't the update statement error....
May 19, 2010 at 8:54 am
Dont worry about the clustered index. It should not be disabled.
May 19, 2010 at 7:40 am
ss-457805 (5/19/2010)
1) Use SELECT INTO to create a new table with the correct content by joining the two involved tables.
2) Drop the old table
3) rename the...
May 19, 2010 at 7:06 am
ss-457805 (5/19/2010)
i followed our steps.
The actual update is only taking 2 minutes. But creating the indexes takes 12 minutes. So in total around 14 minutes. Not a lot improvement...
May 19, 2010 at 6:35 am
You should only use the composite version if you actually perform seeks or joins on all three columns just as you said.
In all other cases you should use include.
Include is...
May 19, 2010 at 1:30 am
ss-457805 (5/18/2010)
Updated 2.6 Million rows.Total number of rows in productionaudit is 2.6 million. This is the test environment. In the live production the number of rows is >20Millions
So, if I...
May 18, 2010 at 9:11 am
ss-457805 (5/18/2010)
I just diabled all the non clustered indexes and ran the update. It took 8 minutes. It is still more than the one i tested using Select *...
May 18, 2010 at 3:26 am
Most likely because of parameter sniffing.
When compiling a stored procedure the SQL server creates an execution plan that is optimal for the parameters specified when the procedure was first run.
It...
May 18, 2010 at 3:04 am
ss-457805 (5/18/2010)
PLease let me know if adding proper indexes can resolve this.
Adding more indexes will not solve the problem.
May 18, 2010 at 2:55 am
sharmadipak (5/17/2010)
I have tried replicating the code below but that didn't worked 🙁
I hope this will work:
select
[2_Org_Code], [2_Org_Name], [3_Org_Code], [3_Org_Name], [YEAR], [Serial No], [Serial_Name], [Serial_Sub_No], [Serial_Sub_Name], [NC], [NC_Description],
'A'+c as...
May 18, 2010 at 2:42 am
ss-457805 (5/17/2010)
I suppose i can drop the indexes, run the update 2Million rows at a time, and then recreate the indexes. But is this the correct way to do it.
Yes,...
May 18, 2010 at 2:14 am
Look at the actual execution plans on your local box and on the server. There should be a clear difference.
This will probably tell you what the problem is.
If you...
May 17, 2010 at 6:52 am
J-F Bergeron (5/17/2010)
May 17, 2010 at 6:41 am
Something like this perhaps:
create table #t (
id int identity(1,1),
AJAN int,
AFEB int,
AMAR int,
FJAN int,
FFEB int,
FMAR int
)
insert into #t (AJAN,AFEB,AMAR,FJAN,FFEB,FMAR) values (1,2,3,4,5,6)
insert into #t (AJAN,AFEB,AMAR,FJAN,FFEB,FMAR) values (11,12,13,14,15,16)
select * from...
May 17, 2010 at 6:23 am
Viewing 15 posts - 166 through 180 (of 309 total)