We are importing daily data (~600K rows) from Google GA4 into our data warehouse.
We are trying to decide how we are going to store the data. We're considering either a partitioned table or a partitioned view that queries daily tables, with the main goal being to improve query speed.
So far, we've implemented a partitioned view, with a primary key on the id and event_date columns. We were happy to see that the estimated execution plan shows that a query that filters by the date range only runs a clustered index scan on the daily tables that are in the date range specified.
However, we were surprised to see how long it took for a query to return the total number of rows for three days (23 seconds) vs running a query against each day individually (less than 1 second).
We were planning on running a test by creating a partitioned table, but wanted to check to see if there were any recommendations or best practices we should know about.