{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Products","product_name":"Treasure Insights","type":"markdown"},"seo":{"title":"Best Practices for Treasure Insights Dashboard and Insights Model Design","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"best-practices-for-treasure-insights-dashboard-and-insights-model-design","__idx":0},"children":["Best Practices for Treasure Insights Dashboard and Insights Model Design"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following best practices provide tips to enhance your dashboard design and insights model design."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This topic contains:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/treasure-insights/best-practices-for-treasure-insights-dashboard-and-insights-model-design#dashboard-design"},"children":["Dashboard Design"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/treasure-insights/best-practices-for-treasure-insights-dashboard-and-insights-model-design#insights-model-design"},"children":["Insights Model Design"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"dashboard-design","__idx":1},"children":["Dashboard Design"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["These are guidelines for improving the performance of dashboards:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The number of recommended widgets in a dashboard is 7-10; every widget results in one or more independent queries."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Limit the number of elements in the dashboard such as filters, as it results in additional queries being run."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Presenting large amounts of data using a pivot or table widget with many rows adds to the dashboard load time."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Avoid wide or long pivot tables. Reduce the number of columns and filter on values to reduce the number of rows."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Avoid using a wide X-axis in line/column charts and fields with multiple items in the “break by” clause."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Avoid too many include/exclude values and dashboard date functions. It is recommended to create the logic in an insights model instead."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Dashboard performance can be improved by limiting the amount of data returned to render; aggregate data as much as possible."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"insights-model-design","__idx":2},"children":["Insights Model Design"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["These are guidelines for improving the performance of Insights models:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["It is recommended to build the Insights model relationship between tables as either a 1-to-many or 1-to-1. Avoid many-to-many relationships."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["One of the join keys should be the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["unique key"]}," for that table."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["If neither join key is unique,"]}," this will result in a many-to-many relationship, which should be avoided."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Any dashboard usage will generate a many-to-many query, causing a huge memory spike and should be avoided."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Avoid creating a model relationship where 2 tables are joined on multiple columns."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Multi-column relationships impact query performance resulting in slower dashboards that consume more memory"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Replace a multi-column unique key with a single-column composite/surrogate key"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["It is recommended that you create a dummy integer key for each unique combination of the columns that are needed to define uniqueness for a row."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If the columns that define uniqueness are 2 short strings:"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add a custom column that concatenates them into a single string"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create the relationship on that custom column"]}]}]}]}]},"headings":[{"value":"Best Practices for Treasure Insights Dashboard and Insights Model Design","id":"best-practices-for-treasure-insights-dashboard-and-insights-model-design","depth":1},{"value":"Dashboard Design","id":"dashboard-design","depth":2},{"value":"Insights Model Design","id":"insights-model-design","depth":2}],"frontmatter":{"seo":{"title":"Best Practices for Treasure Insights Dashboard and Insights Model Design"}},"lastModified":"2025-11-22T02:43:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/customer-data-platform/treasure-insights/best-practices-for-treasure-insights-dashboard-and-insights-model-design","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}