title: Executing a query on a large SQLite DB in python for the first time takes very long
body: <p>I have a relatively large sqlite db (~2 GB). I'm running a simple SELECT query on it and it roughly takes 2 min to run. Any similar query after first execution takes less than a second.</p>
  
  <p>I did some google and apparently this condition is known as 'cold cache/warm cache' behavior. In which at the first attempt, each byte is physically read from the hard disk (cold cache) and this is a slow task. On the next attempts, it simply retrieve data from RAM buffers (warm cache). </p>
  
  <p>However, on my SELECT statement I'm just selecting a few tables with certain conditions. Does sqlite need to transfer ALL the database to RAM first before running any query? Is there any way around it or it's just the way it works?</p>
  
  <p>Thanks for any comment</p>
  
  <p>P.S. I tried VACUUM and ANALYZE but didn't improve execution time.</p>