title: SELECT * FROM table WHERE x IN (...a few hundred ints...)
body: <p>Table has about 8 million rows. There is a non-unique index for X.</p>
  
  <p>Showing indexes, it shows that in the table there is a non-unique index on key name X with "seq_in_index" of 1, collation A, cardinality 7850780, sub_part NULL, packed NULL, index_type BTREE.</p>
  
  <p>Still, this query can take 5 seconds to run. The list of ints comes from another system, and I am not allowed to store them in a table, because they represent friendships on a social network.</p>
  
  <p>Is there a faster way than a massive IN statement?</p>