Thanks,
It's not apparent through the API, but some of your queries are
implicitly doing segmentation on the back end and therefore why some
are taking longer than others.
For query #1. The dimensions and metrics are computed on the fly and
why it takes a bit longer. In some cases you might even get sampled
data.
For query #2. We're looking into this. The API should have timed out.
Are you using one of our supported libraries. If not maybe the request
returned something other than a 200 status code and the library didn't
respond?
For query #3. To increase speed, we pre-compute some of the
combinations of the dimensions and metrics. This query only hits pre-
computed data and why it's so fast. GA simply hits a table, applies
filters and returns whats left.
For query #4. It's the same as #3. Very fast.
So in general, yes going cross category can slow queries down as most
of the in category combinations are pre computed. (Except for date,
which shouldn't matter for any of the categories) Really the
performance difference you are hitting has to deal with whether you
are accessing pre computed data or having to compute the data on the
fly.
-Nick
On Feb 17, 12:27 pm, BenG wrote:
> Nick,
>
> First off, thanks for the information. It was helpful. I had
> forgotten that filters get applied on the final data.
>
> I did some more testing and I think I have found out exactly where the
> slow point is for me. I believe it is the filters. The expected,
> more data = more processing, seem to be occurring at a constant rate.
>
> From my first post i said "I removed all of my filters and still no
> luck", which after more testing I am not so sure was a true
> statement.
>
> This query returns values in approx. 30-60s:
https://www.google.com/analytics/feeds/data?ids=ga:********&metrics=g...
>
> While this query I quit after 5 minutes and it had not completed:
https://www.google.com/analytics/feeds/data?ids=ga:********&metrics=g...
>
> But then I get puzzled when the following query returns in 1-2s which
> is very fast:
https://www.google.com/analytics/feeds/data?ids=ga:********&metrics=g...
>
> The last query above is using the same filter as the 2nd query, but it
> returns very quickly. It is using the date dimensions instead of the
> Country. It seems that i get slow results when using any of the
> "visitor" dimensions.
>
> The final query that at this point I think I am going to have to use
> is similar to the one used in the web interface. It seems to return
> in .5 - 2s seconds.
https://www.google.com/analytics/feeds/data?ids=ga:********&metrics=g...