June 4, 2015 at 5:11 am
Chris any update?
June 4, 2015 at 5:13 am
mohanaprabhu.v (6/4/2015)
Chris any update?
ChrisM@Work (6/4/2015)
...Sure. Start a new thread, and include the Actual Execution Plan as an attachment.
If you want all columns from your invoice table, your options for tuning this query will be limited.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 4, 2015 at 5:33 am
New questions in a new thread please.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 4, 2015 at 5:24 pm
HelloHai (6/4/2015)
Yes i want all columns from invoice table,
You query has no limiting criteria on either the invoice or customer table which means that the best you can do is return the entire invoice table and maybe get an index scan out of the customer table. There's basically no way to improve the query for performance if you already have an index on the CustomerNo with "includes" on the first and last names all from the customer table. If you don't already have such an index, adding one will likely provide only a relatively small improvement.
Opening a new thread probably won't change those facts. π
--Jeff Moden
Change is inevitable... Change for the better is not.
June 5, 2015 at 1:03 am
Jeff Moden (6/4/2015)
Opening a new thread probably won't change those facts. π
He posted a new thread, posted a query slightly different to the one here (with a few WHERE clause predicates), then edited all his posts to remove all info.:unsure:
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 5 posts - 16 through 19 (of 19 total)
You must be logged in to reply to this topic. Login to reply