Which Query is the heavy one?

9 views
Skip to first unread message

MartijnD

unread,
Nov 2, 2009, 10:07:05 AM11/2/09
to google-analytics-api - GA Data Export API
Right now Im implementing a GUI with G Vis using the GA api coding
with PHP.

My queries are very slow loading, which I want to speed up. On user
(me) side I will prevent this by caching the data.

But also I want to be sure that Im efficient enough with the queries.
Right now
Im using about 10 queries which are too many, in my opinion.

Is there a way to send my datarequest queries in one time? Like $ga-
>requestReportData(Array(QUERY1,QUERY2)) ? I think this would also do
its good for reducing loading time


Nick

unread,
Nov 3, 2009, 4:29:47 PM11/3/09
to google-analytics-api - GA Data Export API
Hi,

Batching queries is currently not supported by the API. To speed up
the response, your best bet will be to reduce the date range for which
you are retrieving data. GA stores data at a daily level. Say you are
tracking 30,000 urls with GA. If you ask for ga:pagePath and
ga:pageviews for 30 days, GA will go through 900,000 records to get
your result, even though 30,000 will be returned.

If you asked for two 15 day queries in parallel, we would only have to
go through 450,000 rows for each request, reducing the time of the
query.

-Nick
Reply all
Reply to author
Forward
0 new messages