GoogleCloudPlatform/bigquery-utils

Too many subqueries or query is too complex for "Job Concurrency Slow"

charlibot opened this issue · 4 comments

Hi, I've successfully copied over most of the data sources for BigQuery System Tables Reports but hit an issue with the "Job Concurrency Slow" datasource. When I swap the INFORMATION_SCHEMA_PUBLIC_V2 references for `region-{region_name}`.INFORMATION_SCHEMA and reconnect I see the error:

Resources exceeded during query execution: Not enough resources for query planning - too many subqueries or query is too complex.

Is this expected? Is there a simplified query I can use instead?

I have the same issue with that query.

I got the same, but solved it by moving the job_info part out into a temp table like this:

CREATE TEMP TABLE job_info AS (  
  SELECT
    creation_time,
    end_time,
    project_id,
    reservation_id
  FROM
    `region-us`.INFORMATION_SCHEMA.JOBS_BY_ORGANIZATION
  WHERE
    job_id = @job_param
);  

WITH
   organization_capacity AS (....

But then I get this error instead
Screenshot 2022-04-05 at 10 57 26

I'm getting this error also!

Also tried the workaround above but got a different error, still not able to reconnect.