title: Is there a way to filter data in aes 256 gcm encrypted database?
body: <p>I have a database with sensitive information encrypted with aes 256 gcm. But I have to filter it before sending data to the frontend. Currently, I get all the data and filter it in the application. It works fine now. But I think that it might be a problem in the future when the database gets a lot bigger and my current approach to this problem will be slow and not optimal. But I don't know about a way to search in encrypted rows which are encrypted in the application.</p>
  <p>Example:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>id</th>
  <th>email(not encrypted)</th>
  <th>firstname(encrypted)</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>qwerty@qwerty.com</td>
  <td>DPTR0zNqreWoZUwajRcJJtMlgji7TrSuzcuPbDfIsqvc6g=</td>
  </tr>
  <tr>
  <td>2</td>
  <td>qwerty@qwerty1.com</td>
  <td>DCAvCh1JewOIJl3EQprmgnfy9VT5r6BGFGuyqkBpicNM</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>If the user's 1 name is Patrick and the user's 2 name is Joe how do I get all users using SQL query with a name that starts with Pat...</p>