Quantcast
Channel: SQL Service Broker forum
Viewing all articles
Browse latest Browse all 461

Service Broker based insert statements taking long time

$
0
0
Hello,

One of our developers wrote a stored proc that makes use of service brokers to processes and inserts data from table to another. 
This process involves pivoting columns per user template and write the column values to a global temp table and insert it from there to multiple tables (one per template)
in a user database and every time it inserts into table it drops and creates the existing table and then does the insert. Also the queue has been set to make use of max_queue_readers 
as 16(processors) which means it processes 16 templates (no of rows vary per template) at a time 
and once that is done it process the next 16 templates.  

Initially the time it was taking to do the insert was around 45~60 mins to process around 850000 rows for a specific template and gradually it went up to 5 hours to process the same number of rows for that specific template and overall for 20 templates its taking almost 12 hours from 3 hours.

I am thinking this is something at the queue or service broker end. 
What are the best ways of troubleshooting service broker issues? Like if I use profiler what events shd i be looking at? 

Thanks a lot



Viewing all articles
Browse latest Browse all 461

Trending Articles