https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
w

wide-jordan-14758

12/07/2022, 9:45 PM
Hi, what is the recommended best way to set up tables in our data warehouse in order to structure metrics most efficiently? We have many experiments tracking the same metrics and we'd like to only have to define each metric once within GrowthBook. Is it ideal to have one table with one row per experiment x user x variant or should the source table have a row for each "event" (i.e. more like a clickstream table)? (cc @ambitious-apartment-58735)
f

future-teacher-7046

12/07/2022, 10:47 PM
We recommend the clickstream approach since it gives you the most flexibility. If query performance is an issue, there are a couple things you could do to reduce the amount of data that needs to be scanned: ā€¢ Separate table for each metric instead of a single events table ā€¢ Partition/index on date and use SQL template variables in your metric queries (https://docs.growthbook.io/app/metrics#sql-template-variables)
šŸ‘ 2
18 Views