title: Storing ip adresses efficiently, for faster lookups and insertions (proxy checking)
body: <p>I'm writing a small Python 3 program that is supposed to be testing the validity of a large number of proxies and I want to reorganize data so I can quickly lookup IP, test it via curl, write into database whether it works and timestamp.</p>
  
  <p>With about 50 000 rows, 'simple way' takes too long, thus I need some clever way of searching through IPs.</p>
  
  <p>I'm new to SQL, but if I was do it in some programming language, I would make something like this:</p>
  
  <pre><code>| IP_BYTE1 | IP_BYTE2 | IP_BYTE3 | IP_BYTE4 | TIMESTAMP | WORKS |
  </code></pre>
  
  <p>and then search 'left to right'.</p>
  
  <p>Can anyone help me with creation of such a table and algorithm for fast lookup/insertion?</p>