title: faster search for a substring through large document
body: <p>I have a csv file of more than 1M records written in English + another language. I have to make a UI that gets a keyword, search through the document, and returns record where that key appears. I look for the key in two columns only.</p>
  
  <p>Here is how I implemented it:</p>
  
  <p>First, I made a postgres database for the data stored in the CSV file. Then made a classic website where the user can enter a keyword. This is the SQL query that I use(In spring boot)</p>
  
  <pre><code>SELECT * FROM table WHERE col1 LIKE %:keyword% OR col2 LIKE %:keyword%;
  </code></pre>
  
  <p>Right now, it is working perfectly fine, but I was wondering how to make search faster? was using SQL instead of classic document search better?</p>