Home Forums SQL Server 2005 SQL Server 2005 Performance Tuning SID Makes Query Slow in Clustered Column store? Execution Plan increased though CPU Time came down. RE: SID Makes Query Slow in Clustered Column store? Execution Plan increased though CPU Time came down.

  • Oops. yes. Another query1, query2, not your query1, query2. Sorry about that.

    First most likely issue, the two different tables in the query, DIM_MATERIAL vs. DIM2_MATERIAL are showing different statistics right from the start. The cardinality for one is 82000 the other is 81999. That's a miniscule difference, but if that statistic is different, that might explain why the two plans are different. All the other estimates are a little off. The principal difference is in where the Compute Scalar operation is located. I'd suggest getting the statistics up to date as a starting point.

    The second plan timed out during compile, so that might explain the difference too. Again, possibly caused by the differences in structures, possibly relating to statistics or something else around DIM2_MATERIAL.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning