SQL Server 2008 Multithreading Aggregates

  • Hi,

    I am having terrible trouble trying to work out why one installation of SQL server seems to be behaving differently from another, any help would be very much appreciated.

    I have two machines running SQL 2008 Enterprise, one a macbook running server 2008 64 (dual core processor, 4gig of ram), and one a pedestal server running vista 64 (16Gb ram, 4 core processor).

    I have a database that (in this simple example contains 20-50 Million records in a 'flat' table. If I want to run a query such as:

    SELECT AVG(ItemCost) FROM tbl_Items

    The Macbook 'server' will pull the data together (mostly from memory) and calculate the average using both cores. The caching of this is pretty substantial as the query goes from taking around 20seconds to 3 seconds.

    The Pedestal server will perform the same aggregation but seems to calculate the average using only one core. It further seems to be hitting the disk and takes a fairly consistent 15-20 seconds regardless of the number of times the query is run.

    I have set (and ensured they are consistent) all of the obvious parameters: the sever is set to use 8-12GB of ram, 4 processors and to use 4 threads for multithreading (set using the advanced options).

    My questions are: Should Server 2008 use multiple cores to calculate large averages? Is there anything I can do to force the slower Pedestal installation to use multiple cores? Why might the pedestal server be hitting the disk so much more than the macbook?

    If I have neglected to give any required information, please let me know what you need to know.

    Regards

    Stephen

  • If you run that query frequently you will be much better off using an indexed view.


    * Noel

  • Hi Noel,

    Thanks for the information, however I should have made clearer that this isn't actually a query we use it is simply the most extreme example of the issue we are facing.

    Regards

    Stephen

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

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