Note that there are some explanatory texts on larger screens.

plurals
  1. POPerformance-related: How does SQL Server process concurrent queries from multiple connections from a single .NET desktop application?
    primarykey
    data
    text
    <p>Single-threaded version description:</p> <ol> <li>Program gathers a list of questions.<br></li> <li>For each question, get model answers, and run each one through a scoring module.</li> </ol> <hr> <ul> <li>Scoring module makes a number of (read-only) database queries.</li> <li>Serial processing, single database connection.</li> </ul> <p>I decided to multi-thread the above described program by splitting the question list into chunks and creating a thread for each one.</p> <p>Each thread opens it's own database connection and works on it's own list of questions (about 95 questions on each of 6 threads). The application waits for all threads to finish, then aggregates the results for display.</p> <p>To my surprise, the multi-threaded version ran in approximately the same time, taking about 16 seconds instead of 17.</p> <p><strong>Questions:</strong></p> <p>Why am I not seeing the kind of gain in performance I would expect from executing queries concurrently on separate threads with separate connections? Machine has 8 processors.</p> <p>Will SQL Server process queries concurrently when they are coming from a single application, or might it (or .net itself) be serializing them?</p> <p>Might there be something misconfigured, that would make it go faster, or might I just be pushing SQL Server to its computational limits?</p> <p><strong>Current configuration:</strong></p> <p>Microsoft SQL Server Developer Edition 9.0.1406 RTM<br> OS: Windows Server 2003 Standard<br> Processors: 8<br> RAM: 4GB</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload