views:

31

answers:

1

Setup

  • Cost of Threshold for Parallelism : 5
  • Max Degree of Parallelism : 4
  • Number of Processors : 8
  • SQL Server 2008 10.0.2.2757
  • I have a query with many joins, many records.
  • The design is a star. ( Central table with fks to the reference tables )
  • The central table is partitioned on the relevant date column.
  • The partition schema is split by days
  • The data is very well split across the partition schema - as judged by comparing the sizes of the files in the filegroups assigned to the partition schema
  • Queries involved have the predicate set over the partitioned column. such as ( cs.dte >= @min_date and cs.dte < @max_date )
  • The values of the date parameters are a day apart @ midnight so, 2010-02-01, 2010-02-02
  • The estimated query plan shows no parallelism

a) This question is in regards to Sql Server 2008 Database Engine. When a query in the OLTP engine is running, I would like to see / have the sort of insight one gets when profiling an SSAS Query using Progress End event - where one sees something like "Done reading PartititionXYZ".

b) if the estimated query plan or the actual query plan shows no parallel processing does that mean that all partitions will be / were checked / read?

c) suggestions? Is there more information that I need to provide?

d) how can I tell if a query is processing in parallel w/o looking @ the actual query plan?

A: 

a) I am not aware of any way to determine how a query has progressed while the query is still running. Maybe something finicky with the latching and locking system views, but I doubt it. (I am, alas, not familiar enough with SSAS to draw parallels between the two.)

b) SQL will probably use parallelism when working with multiple partitions within a single table, in which case you will see parallel processing "tokens" in your query plan. However, if for whatever reason parallelism is not invoked yet multiple partitions must be read, they will be read without the use of parallelism.

d) Another thing that perhaps cannot be done. Under very controlled cirsumstances, you could use System Monitor (Perfmon) to track CPU usage or perhaps disk reads during the execution of they query. This won't help if the server is performing other work, or the data is resident in memory (the buffer cache), and so may be of limited use.

c) What is it you are actually trying to figure out? Which partitions (if any) are being accessed by users over a period of time? Is SQL generating a "smart" query plan? Without details of the data, structure, and query, it's hard to come up with advice.

Philip Kelley
"Without details of the data, structure, and query, it's hard to come up with advice."? What sort of details would you like? Other than what feels to me to be lots of details in the original question?
MaasSql