Multi threading in SQL Server 2005

  • I am having one procedure, which will extract some 1000's of records from different tables for calculating some metrics. For this I am planning to separate all records into different ranges and run the procedure parallel for all the ranges..... Is there any way of doing that......

  • there's no need;

    SQL server is designed to work in sets; so the time it takes to apply a calculation against 1 row of data is about the same as 10K rows of data; it does get a little slower once you get into the millions of rows, but it's infinitely faster than your idea of breaking out groups.

    so if you can define the calculation for the metric, SQL will apply that calculation to all rows , and you should expect sub-second responses for all rows in a single operation.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply