How many rows in INVOICE_LINE_ITEMS in total? That seek of ~5 million rows seems like an incorrect choice. Tough to tell things from an estimated plan, though. Do you get the same plan for different parameters (like a single day, or an entire year)? It may be worth using OPTION (RECOMPILE) to prevent caching a plan optimized for small date ranges and using it for large date ranges (or vice versa).
Up to 50 attachments (including images) can be used with a maximum of 209.7 MB each and 209.7 MB total.
Answers and Comments
query plan x650
plan explorer upload x463
asked: Apr 20 at 06:59 AM
Seen: 176 times
Last Updated: Apr 26 at 04:33 PM
This query is very slow. I am new to spatial indexes and am not sure where to begin tuning this query.
How can I avoid this bad plan
I would like to reduce the access to these tables: fact_input_output, dim_org_v, rap_combo
How can I further optimise this query?
How to improve performance
How to get rid of Hash Join and Sort
Help Optimizing View
Estimated way too less compared to Actual no of rows
© 2013 SQL Sentry, Inc. All rights reserved.