January 24, 2012 at 11:59 pm
Hi All,
I have stored procedure where i am building an xml by Concatenating the string
at different levels and at last converting string into xml.
Problem here is in the process of Concatenation it taking more time and performing poorly.
The length of string is around 4 lakh characters.
Please suggest the solution.
Regards,
Ningaraju
January 25, 2012 at 2:40 am
Post some code, otherwise I highly doubt you will get any help.
See the first article linked in my signature line if in doubt.
-- Gianluca Sartori
January 26, 2012 at 11:41 pm
Code is not much complex just concatenating the big string thats it.
January 26, 2012 at 11:48 pm
ningaraju.n (1/24/2012)
Hi All,I have stored procedure where i am building an xml by Concatenating the string
at different levels and at last converting string into xml.
Problem here is in the process of Concatenation it taking more time and performing poorly.
The length of string is around 4 lakh characters.
Please suggest the solution.
400,000 characters is quite a long string, but why it is slow is probably down to the method you are using to concatenate. The slow approach I normally see involves concatenation a short new section many times, which involves a lot of copying. It is often possible to speed things up quite dramatically, but without knowing which method you are currently using, it is hard to be specific.
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
January 26, 2012 at 11:49 pm
ningaraju.n (1/26/2012)
Code is not much complex just concatenating the big string thats it.
Just post a very small section of code that shows your technique. Are you using a WHILE loop? Concatenating into a column or a variable? Many questions will be answered by posting a short example, and you will get a good answer faster.
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply