October 11, 2012 at 6:04 am
CREATE TABLE #Criteria14Segments ([SegmentNo] [SMALLINT] NOT NULL) ON [PRIMARY];
INSERT INTO #Criteria14Segments WITH (TABLOCKX)
SELECT SegmentNo
FROM UserData.dbo.CriteriaDistribution
WHERE LocalIdentifierID = 8888
AND isExcluded = 'FALSE'
AND CriteriaID = 14
- I want to check if there is any way to improve performance when we insert into large number of rows?
October 11, 2012 at 6:09 am
Or we can do bulk insert if we can using xml to improve performance?
October 11, 2012 at 8:45 am
How is the performance from the select? It seems like you can't have that many rows. I am assuming the SegmentNo is a unique value? With a small int you can't have more than 32k rows.
There are certainly things that can be done to increase performance but there is not much of a picture of what is going on here.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply