I have a SQL query generated by Microstrategy and want to improve performance.
Sample Code:
This query is doing an all rows scan of the fact table without first filtering on the week specified in the week dimension table. I have a somewhat limited knowlege of query plans but I would like to know if there is any tuning that could make the query perform in the same way as the one below?
Thanks for any assistance
Sample Code:
Code:
SELECT
WEEK_DIM.WEEK_DESC,
FACT.SALES
FROM
FACT,
WEEK_DIM
WHERE
FACT.WEEK = WEEK_DIM.WEEK
AND [COLOR=blue]WEEK.LAST_WEEK_IND = 1[/color]
Code:
CODE
SELECT
WEEK_DIM.WEEK_DESC,
FACT.SALES
FROM
FACT,
WEEK_DIM
WHERE
FACT.WEEK = WEEK_DIM.WEEK
AND [COLOR=blue]FACT.WEEK = 200408[/color]
Thanks for any assistance