title: GCP BigQuery - LIMIT but full table read - How to limit queried data to a minimum
body: <p>It looks like <code>LIMIT</code> would have no effect on the amount of processed/queried data (if you trust the UI).</p>
  <hr />
  <p><a href="https://i.stack.imgur.com/FLolo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FLolo.png" alt="enter image description here" /></a></p>
  <hr />
  <pre><code>SELECT
    * --count(*)
  FROM
    `bigquery-public-data.github_repos.commits`
  -- LIMIT   20
  </code></pre>
  <p>How to limit the amount of queried data to a minimum (even though one whole partition would probably always be needed)</p>
  <ul>
  <li>without to use &quot;preview&quot; or similar</li>
  <li>without to know the partition / clustering of the data</li>
  </ul>
  <p>How to check the real approximate amount before a query execution?</p>
  <hr />
  <p>In the execution details is stated that only 163514 rows has been queried as input (not 244928379 rows)</p>