Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8872251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:10:46+00:00 2026-06-14T18:10:46+00:00

Running the query SELECT project, test_id, log_time, connection_spec.client_geolocation.latitude, connection_spec.client_geolocation.longitude FROM m_lab.2012_11 GROUP BY project,

  • 0

Running the query

SELECT project, test_id, log_time,
       connection_spec.client_geolocation.latitude, 
       connection_spec.client_geolocation.longitude
FROM m_lab.2012_11
GROUP BY project, test_id, log_time,
         connection_spec.client_geolocation.latitude, 
         connection_spec.client_geolocation.longitude
ORDER BY log_time LIMIT 6

succeeds in ~20 seconds

However, adding a WHERE clause to this that should reduce the number of returned rows

SELECT project, test_id, log_time,
       connection_spec.client_geolocation.latitude, 
       connection_spec.client_geolocation.longitude
FROM m_lab.2012_11
WHERE log_time > 0
GROUP BY project, test_id, log_time,
         connection_spec.client_geolocation.latitude, 
         connection_spec.client_geolocation.longitude
ORDER BY log_time LIMIT 6

results in the error ‘Response too large to return.’

My expectation is that limiting the rows returned will increase the execution time as more rows need to be scanned, but the response should be the same size. What am I missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T18:10:47+00:00Added an answer on June 14, 2026 at 6:10 pm

    First, the number of rows scanned is constant. BigQuery does not index rows (by design) and performs a full table scan on the table you specify.

    With billions of rows in this m-lab table, I think the general issue here is that the amount of unique results generated via multiple GROUP BY is really large in both queries, which produces a ‘Response too large’ error for individual nodes in the BigQuery execution tree.

    One approach:

    One way to approach this query is to use a new feature we called GROUP EACH BY. This provides applies a shuffle operation to balance the groupings across the serving tree. It works best when there are many individual values per GROUP ‘bucket.’ In the m-lab dataset, almost every entry is attached to project “0,” so I would remove that from the query result, and GROUP EACH BY the other, more numerous values:

    SELECT test_id, log_time,  connection_spec.client_geolocation.latitude,  connection_spec.client_geolocation.longitude
    FROM
      [measurement-lab:m_lab.2012_11]
    WHERE
      log_time > 0 AND project = 0
    GROUP EACH BY
      test_id, log_time, connection_spec.client_geolocation.latitude,   connection_spec.client_geolocation.longitude
    ORDER BY log_time LIMIT 6;
    

    Another strategy:

    The result you are querying for lists results in order of log_time, meaning you are actually only returning the earliest log_time data points. Why not run a subselect for a group of time points, and then run your GROUP BY using the result set in your WHERE clause. This query should run much faster than the other example:

    SELECT
      test_id, log_time, connection_spec.client_geolocation.latitude, connection_spec.client_geolocation.longitude, COUNT(*) AS entry_count      
    FROM
      [measurement-lab:m_lab.2012_11]
    WHERE
      project = 0 AND log_time IN
      (SELECT log_time FROM [measurement-lab:m_lab.2012_11] WHERE log_time > 0 GROUP BY log_time ORDER BY log_time LIMIT 6)
    GROUP BY
      test_id, log_time, connection_spec.client_geolocation.latitude, connection_spec.client_geolocation.longitude  ORDER BY log_time, entry_count;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm running this query: SELECT TOP 1 [DVD Copy].[Stock No] FROM [DVD Copy] WHERE
I'm running the following query SELECT ROW_NUMBER() OVER(ORDER BY [TransactionValues].[ID]) AS idx, [Transactions].[ID] AS
I'm currently running the following query: SELECT * from people WHERE id = 4;
I am running a simple join query select count(*) from t1 join t2 on
Running this query takes a long time: SELECT host,ip FROM arecords WHERE ip IN
After running this query statement with my database: select * from articles where content
I'm running a query which looks like this SELECT parent.field, child.field FROM parent JOIN
I am running following query. SELECT T1.C1, T2.C2..., IF( T1.C1<>T2.C1,Changed,1) AS NewColumn From T1
I'm running this query SELECT country, countries.code, countries.lat, countries.lng, countries.zoom, worldip.start, worldip.end FROM countries,
I am running this query select * from measTbl where dateone>'201112100000' and dateone<'202001010000' and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.