Database Reference
In-Depth Information
Result Too Large
When new users first try the service, it is common for them to start by trying
the simplest possible query to get a feel for the web interface, command-line
client, or API. The usual candidate is something along the lines of:
SELECT * FROM [publicdata:samples.wikipedia]
It is an unfortunate way to start because the service responds with a
disappointing error message.
errorResult": {
"reason": "responseTooLarge",
"message": "Response too large to return."
}
Considering that the service is intended to operate on “Big Data,” it is
somewhat surprising that it is complaining that such a simple operation is
too large.
In this particular scenario the underlying issue is that users are expecting
the service to behave like traditional databases they are familiar with, but
the service is not quite meeting their expectation. In a database, the result
of a query is a cursor , which allows you to fetch rows incrementally. When
the result can be trivially computed, the cursor can just be a fancy pointer
into the source table. Most tools will fetch a small number of rows from
the cursor and then discard it. BigQuery operates differently; a query is
actually a job that transforms a set of source tables into a new table. As a
result the simple SELECT * query is actually attempting to make a full copy
of the Wikipedia sample table. Making a copy is definitely not what users
had in mind. Fixing the query is simply a matter of appending a LIMIT
with a reasonable value to the end. However, this error merits additional
discussion.
Search WWH ::




Custom Search