Hi, what is the recommended best way to set up tab...
# ask-questions
w
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
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