Home Forums SQL Server 2012 SQL Server 2012 - T-SQL Odd performance query behavior on very large 40 TB partitioned table in distributed view, maybe it's tipping? RE: Odd performance query behavior on very large 40 TB partitioned table in distributed view, maybe it's tipping?

  • In difference to Kevin, I think that that there is some hope that we may be able to help you in this forum, and save you the cost from hiring a consultant. But no promises, we'll see.

    In any case, the difference between the two plans is that in the good plan, the optimizer did partition elimination just fine, and only queried the database for July. In the bad plan, it queries all tables in the partitioned view.

    So why would the optimizer do this? I have some theories, but I first need to see the view definition, and the definition of all tables, including their indexes, in the view. (Please post the table scripts as an attachment.)

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]