Home > Articles > Data > SQL Server

📄 Contents

  1. Recommended Practices for Dimensions
  2. Recommended Practices with Partitions and Aggregations
  3. Summary
Like this article? We recommend Recommended Practices with Partitions and Aggregations

Recommended Practices with Partitions and Aggregations

The following sections offer recommendations for working with partitions and aggregations.

#1: Abide by Prescribed Limits for Partition Sizes

Microsoft recommends limiting partition sizes so they contain up to 20 million rows or have a file size up to 1GB. Some applications attempt to use much larger partitions, perhaps because data is partitioned only by month or by day. Realize that during processing, MSAS has to read an entire partition’s data on a single thread. It is often more efficient to process five partitions of 20 million rows, in parallel, as opposed to processing a single partition with 100 million rows. Furthermore, if you partition your data according to the typical query patterns, you will see a far superior query performance than if your measure group had a single large partition.

For example, let’s suppose your measure group is partitioned by year and by product category. Suppose we have data for five years and for three categories (bikes, accessories and clothing). If we store all data in a single 15GB partition, every query will have to examine this 15GB data file (presuming data is not found in an MSAS storage engine cache and no useful aggregations exist for resolving the query). Now let’s split the data into 15 partitions of 1GB each—one for a combination of each year and category. A query examining bike sales for 2009 will only have to read a single 1GB file. Scanning 15GB of data will invariably be slower than scanning a 1GB file. Many people feel that they will end up with too many partitions if they partition data on any dimension other than time or date dimension. This simply is not true. Theoretically, there is a limit to the number of partitions per cube—2 billion. Most cubes will have far fewer partitions, however. So go ahead and partition by multiple hierarchies when possible to match the pattern of data retrieval.

You have a couple of options for populating measure groups partitioned by multiple hierarchies. You could define a separate view in the relational data source for each partition, each view retrieving only portion of fact table’s data. Alternatively, you could also bind each partition’s definition to a different query. Personally, I prefer the second option, particularly for environments where I don’t have direct access to make schema changes in the relational source.

#2: Define the Slice Property for Every Partition

Much like dimensions, each partition also has several properties that should be carefully examined and configured appropriately. Although some literature advises that setting a partition slice property is unnecessary for MOLAP partitions, do yourself a favor and set this property for every partition. At query time, MSAS checks partition XML files (these files are called info.version_number.xml) for internal data ids identifying data ranges for each dimension attribute. At times, if partition slice isn’t defined, you will notice that MSAS reads more partitions than necessary to resolve a query. For example, instead of only reading the bike_sales_2004 partition, Analysis Services may also read the clothing_sales_2005 partition if the slice property isn’t set, even if the query only requested data for bike sales in 2004. Reading a single partition will be faster than reading multiple partitions.

#3: Use the Aggregation Manager Sample Tool for Designing Custom Aggregations

Microsoft re-engineered the Usage-Based Optimization (UBO) Wizard with Analysis Services 2008 because with version 2005, it wasn’t always effective; at times, the wizard would not create useful aggregations even if you chose a 100 percent performance improvement goal. Business Intelligence Development Studio (BIDS) 2008 also offers the ability to pick and choose which attributes should be included in a specific aggregation through the advanced view within the Aggregations tab. SQL Server Management Studio (SSMS) allows scripting aggregation designs. However, neither BIDS nor SSMS wizards allow crafting aggregations for specific queries.

If you find that UBO does not meet your needs, then download the Aggregation Manger sample tool. The tool is easy to use and works with both 2005 and 2008 versions. First, clear the query log, next execute the query workload for which you would like to tune performance, and then build aggregations based on the query log. You may want to use eliminate redundancy and remove duplicates options within Aggregation Manager so that you don’t have too many aggregations.

You can have multiple aggregation designs per measure group. For example, you could have one aggregation design with many aggregations for frequently accessed partitions; another aggregation design containing only a few aggregations could be applied to rarely queried historical partitions.

#4: Use Separate Measure Groups for Distinct Count Measures

This recommendation is well documented but not always followed. BIDS automatically assigns a measure with distinct count aggregation function to its own separate measure group. However, if you create a measure with sum, count or another aggregation function and later change its aggregation function to distinct count, then BIDS will allow you to shoot yourself in the foot. Fortunately, BIDS 2008 does warn developers of such mistakes.

#5: Specify the Maximum Degree of Parallelism for Processing Objects on Multi-Processor Servers

By default, MSAS decides the appropriate degree of parallelism for processing operations. However, on multi-processor hosts you may find that software sometimes attempts to do more than it can handle. Processing too many partitions in parallel may also exact unbearable load on the relational database server. Fortunately, you can override the default option and specify the degree of parallelism for processing operations through XMLA commands.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020