title: Alternate to Like in jsonb postgres
body: <p>I have a Postgres table with more than 25M records, there I have a jsonb column called info.</p>
  
  <p>sample json format:</p>
  
  <pre><code>{
  "username1":{"name":"somename","age":22,"gender":"male"},
  "fathername":{"name":"somename","age":22,"gender":"male"}
  }
  </code></pre>
  
  <p>I am going to find number of records that match the 'user%' key value.</p>
  
  <p>Here is my query</p>
  
  <pre><code>select count(1) from tablename where info::text like '%user%';
  </code></pre>
  
  <p>this query is working and I am getting result for it, but it is taking long time to execute this query in 25M records.</p>
  
  <p>Is there any way that I can optimize this query or any alternate method to achieve it? Please help.</p>
  
  <p>Thanks in advance!</p>