views:

23

answers:

1

I'm using GAPI library (in PHP) for querying Google Analytics API.

I request 2 dimensions (pagePath, date), 2 metric (pageviews, visits), past 365 days time range, and 2 filters for pagePath. Average time to get data for one query is 25-30 sec.

When I use only 1 metric (pageviews), average response time is 3 sec.

Why would there be such a difference when using 1 or 2 metrics?

+1  A: 

I'm guessing that the path/date/pageviews is stored pre-calculated, while the path/date/visits needs to be calculated off the data-store (be thankful you're not applying complicated segments - then it gets really slow).

There's hints about how this might work in the google BigTable paper.

Jamie