title: SQL: Get all rows with matching string, how can I improve performance?
body: <p>I'm building a little application that allows users to create comments on webpages. The way it works is that you send the <code>origin</code> with the comment you want to add to a page, then you fetch all the comments for a page by querying <code>WHERE origin LIKE 'https://somesite.com/page-1'</code>.</p>
  <p><code>id</code> is unique, but <code>origin</code> obviously isn't, as there might be multiple comments for a specific page.</p>
  <pre><code> table_name | column_name |          data_type
  ------------+-------------+-----------------------------
   Comment    | id          | text
   Comment    | origin      | text
   Comment    | body        | text
  </code></pre>
  <p>So far this has worked pretty well, but the database is still relatively small. I don't see this scaling very well but I'm unsure of how it could be improved.</p>
  <p>My initial thought was to create a different copy of the above table on the fly for each new site added, but that sounds like a nightmare to manage in case I needed to deploy changes to my schema.</p>
  <p>How should I handle a situation like this? How should my database schema look?</p>