title: Fastest way to search for a row in a large Google Sheet using/in Google Apps Script
body: <p>GAS is quite powerful and you could write a full fledged web-app using a Google Sheet as the DB back-end. There are <a href="https://medium.com/@eric_koleda/why-you-shouldnt-use-google-sheets-as-a-database-55958ea85d17" rel="nofollow noreferrer">many reasons not to</a> do this but I figure in some cases it is okay.</p>
  <p>I think the biggest issue will be performance issues when looking for rows based on some criteria in a sheet with a lot of rows. I know there are many ways to &quot;query&quot; a sheet but I can't find reliable information on which is the fastest.</p>
  <p>One of the complexities is that many people can edit a sheet which means there are a variable number of situations you'd have to account for. For the sake of simplicity, I want to assume the sheet:</p>
  <ul>
  <li>Is locked down so only one person can see it</li>
  <li>The first column has the row number (<code>=row()</code>)</li>
  </ul>
  <p>The most basic query is finding a row where a specific column equals some value.</p>
  <p>Which method would be the fastest?</p>