title: Mysql - selecting a row with checksum value
body: <p>I'm designing a small ecommerce website with a mysql database. I wanted to keep the URL clean without any hard coded product id.</p>
  
  <p>So given a path <a href="http://example.com/shop/" rel="nofollow noreferrer">http://example.com/shop/</a>{product-name}</p>
  
  <p>I opted to convert the {product-name} to a crc32 checksum in PHP and store it in the product table.</p>
  
  <p>When a request is received for a product page, it is converted to crc32 checksum and queried for matching rows. I did this only for the product pages and blog pages.</p>
  
  <p>My question</p>
  
  <ol>
  <li><p>So far its working well on localhost. Will this be a scalable solution once traffic increases? Any way to test this?</p></li>
  <li><p>Will indexing the checksum column help for Select queries?</p>
  
  <p>checksum INT UNIQUE NOT NULL</p></li>
  </ol>
  
  <p>I read insert statement will take a performance hit. But assuming inserts would be occasional (2-3 per week for blog or new products once in 3 months perhaps) a 2-3 seconds time is acceptable. How bad could it get?</p>
  
  <ol start="3">
  <li>Is storing the checksum value as a binary better? Consider the additional task of converting the checksum to binary before every request.</li>
  </ol>