title: BigQuery Deadline Exceeded and RuntimeException
body: <p>When I am running a query which I am confident the result set isn't that large. I keep getting this error, can someone explain what causes this error and how can I change my query to avoid this (other than selecting less data because that is not something I am able to change for this query)</p>
  
  <p>Error preparing subsidiary query: com.google.storage.megastore.exception.DeadlineExceededRuntimeException: Deadline exceeded: Deadline</p>
  
  <p>my query is basically selecting data for a month and then applying a case clause and a group by. There are no joins</p>
  
  <p>Here is a cleaned up version of my query. Most of the columns are just strings.</p>
  
  <pre><code>select
  counted,
  CONCAT(user_id,"_",string(index)) as user_id,
  name,
  -- We want to give each event an alias here, so the first event in the funnel would be called step1
  case when name="16" and param7 = "b" then 'step1'
  when name="71" then 'step2'
  when name="73" then 'step3'
  when name="10" and param7= "b" and param1="a" then 'step4'
  when name="18" then 'step5'
  when name="31" then 'step6'
  else 'na'
  end as step
  from (TABLE_DATE_RANGE([tablename_],TIMESTAMP('2016-04-01'),TIMESTAMP('2016-05-01')))
  -- selects all of the 6 steps in the funnel.
  WHERE (name = "16" AND param7 = "b") OR (name = "71") OR (name = "73") OR (name="10" AND param7 = "b" AND  param1 = "a") OR (name = "18") OR (name = "31")
  </code></pre>