title: (MYSQL) Performances in checking if an ID already exists (for ex. in a Poll voters table)
body: <p><strong>I would like to know which is the best when I want to check if somebody already participated to a members related event (like a poll)</strong>:</p>
  
  <p>Imagine that I have <strong>a table that stores all the voters votes</strong>. Over time, it can reach a very big size (10000+ entries/votes for 500 different polls).</p>
  
  <p>When I want to check if a member has already voted to my new poll, what's the best? :</p>
  
  <p>1/ Make a <strong>SELECT or a COUNT</strong> on the <strong>"10000+ entries VOTERS table"</strong> to see if said USERID already voted to my new poll.</p>
  
  <p>2/ Having a <strong>TEXT columns in my POLL_main_infos Table</strong> where i <strong>stock/CONCAT the USERIDS</strong> like these:</p>
  
  <p><strong><em>"1,15,42,12,523,8521,7444, etc etc."</em></strong></p>
  
  <p>And to check, I get that columns as a variable then in my PHP script, I use a REGEX to check if a USERID is already present in it (like looking for ",42,", meaning the USER with the ID "42" already participated to said poll.</p>
  
  <p>Also, <strong>if the second solution is the best, should I stock the IDS in a text column or a BLOB?</strong></p>
  
  <p>Anyways, thank you very much in advance!</p>