title: simple multiple user selections/options
body: <p>I see many implementations such as the Facebook like, forum karma, mark as read on forum posts and other simple options and selections available to multiple users on a given item.</p>
  
  <p>I know I can implement this in mysql by creating a table which links say post IDs to liker user IDs for say, a like system.</p>
  
  <p>My problem is, on a page with lots of posts, I will have to make a lookup for every post. I use prepared statements so that makes it faster for me.</p>
  
  <p>Is there another way to implement these systems, if not, are there optimisations like database types or other tweaks that can make this faster?</p>
  
  <p>Basically, is there a powerful, fast implementation of a many to many database interaction.</p>
  
  <p><em><strong></em>*EDIT***</strong> 
  I'm using opera mini and so I have issues with the ajax and js for commenting</p>
  
  <hr>
  
  <p>Right now, I have a table with two columns. One for user id and the other for post id.  Both are indexed and are used in foreign key constraints.
  I'm thinking of making a compound primary key across the two.</p>
  
  <p>My main issue is for the karma. I allow users to vote on each post. The problem is, for each post, I need to get the total votes, determine if a user has voted to either allow the user to or not to vote.</p>
  
  <p>My site allows many users to host their own sites and so I need to seriously optimize this.</p>
  
  <p>Someone suggested I use memory tables for this.</p>
  
  <hr>
  
  <p>NOTE*<em>*</em> 
  I can't use memcached.</p>