|
-
 Originally Posted by Test2day
We tried creating a table partitioned by composite range
PARTITION BY RANGE(insert_date, report_date, dwbuid)
The thinking was that by having both dates part of range partition will allow users to have queries that hit either insert_date or report_date to get same performance.
it turns out that queries that reference insert_date are much faster than the ones that hit report_date.
Queries that hit report_date do a full index scan. (slow) 2 min
queries that hit insert_date hit the correct partition ranges. (fast) 10 sec
Need a way to have both dates have the same weight regardless of the order of which they are enumerated in the partitioning statement.
Partitioning strategy is wrong.
Partition by range on (insert_date) then create indexes on insert_date, report_date and dwbuid.
Is this a FACT table?
do you have a DIMension describing dates? In the affirmative case, is your DIM_DATE table pointing to a surrogate date on FACT?
do you have a DIMension describing dwbuid?
If you got four"YES" that means star-schema is properly designed then consider defining insert_date, report_date and dwbuid as bitmap indexes; user queries should mention DIM tables.
Last edited by PAVB; 12-13-2010 at 11:14 AM.
Reason: typo
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|