January 14, 2014 at 7:11 am
This is the query which takes about 32 seconds to execute. Any help will be appreciated.
Checked the index on **ID which is only 10% fragmented. No blocking issues.
SELECT fct.AccountID, count(*)
FROM fctAssetFulfillment fct
JOIN FulfillmentPartnerInstall fpi ON fpi.FMProBoxID = fct.AMC_BoxID
WHERE fct.Source = 'FMPro' AND isnumeric(fct.AMC_BoxID)<>0
AND fct.SerialNo = fpi.SerialTag
AND fpi.CompletionDate IS NOT NULL
AND fpi.AssetUsage LIKE '%install%'
AND fct.InstallActualDate<>fpi.CompletionDate
--AND (fct.FulfillmentStatus <> 'installed')
GROUP BY fct.AccountID
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
January 14, 2014 at 7:16 am
Can you attach the actual execution plan please, saved as a .sqlplan file? Thanks.
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
January 14, 2014 at 7:19 am
for this query, i think we'd need to see the actual execution plan on this, as well as a list of all indexes on the fctAssetFulfillment and the FulfillmentPartnerInstall tables.
can you post that here as a .sqlplan attachment?
one problem is this portion of the WHERE statement:
AND fpi.AssetUsage LIKE '%install%'
'that's going to require a scan of the table; is there another way to filter the data to get the same rows? a status which coincides with that, maybe?
New Born DBA (1/14/2014)
This is the query which takes about 32 seconds to execute. Any help will be appreciated.Checked the index on **ID which is only 10% fragmented. No blocking issues.
SELECT fct.AccountID, count(*)
FROM fctAssetFulfillment fct
JOIN FulfillmentPartnerInstall fpi ON fpi.FMProBoxID = fct.AMC_BoxID
WHERE fct.Source = 'FMPro' AND isnumeric(fct.AMC_BoxID)<>0
AND fct.SerialNo = fpi.SerialTag
AND fpi.CompletionDate IS NOT NULL
AND fpi.AssetUsage LIKE '%install%'
AND fct.InstallActualDate<>fpi.CompletionDate
--AND (fct.FulfillmentStatus <> 'installed')
GROUP BY fct.AccountID
Lowell
January 14, 2014 at 7:26 am
Does this help?
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
January 14, 2014 at 7:29 am
No, they're just pictures. It's like asking for a car and being given a picture. Execution Plans are active - hover over objects to view properties etc.
Right-click on the execution plan (actual, not estimated) and select "save execution plan as..."
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
January 14, 2014 at 7:29 am
not really;
the actual SQL plan allows us to review deep details of the plan, and tell if stats are out of date, which columns were used, which indexes, and so much more;
a picture of it's not enough.
Lowell
January 14, 2014 at 8:06 am
I did save the plan but I don't know how to copy it on my local machine.
"He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]
January 14, 2014 at 8:16 am
This should help you to post the information needed.
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply