title: mysql sphinx generate unique id
body: <p>I have my database segmented in 8 parts, where each part contains database with table user_data, for better search performance im using sphinx to index all those data but im come accross one problem ... since table user_data dont have any unique field to represent each row but its a 1 to many table i have trouble to run my sphinx index correctly since it requires unique id and this way resolve in duplicate ids ... any idea how can i workaround this? or generate unique id throught all sub indexes from different segments?</p>
  
  <p>example:</p>
  
  <pre><code>SELECT user_id, item_id, info
  FROM user_data
  </code></pre>
  
  <p>Which returns something like:</p>
  
  <pre><code>+----------+-----------------------+
  | user_id  | item_id    | info     |
  +----------+-----------------------+
  | 10       | 151        | asdf     |
  | 10       | 152        | test     |
  | 11       | 151        | 545      |
  | 12       | 151        | sdfsd    |
  | 12       | 152        | eewwe    |
  | 12       | 153        | dfsd     |
  </code></pre>
  
  <p>but i have to get</p>
  
  <pre><code>+----------+-----------------------------+
  | user_id  | item_id    | info     | id  |
  +----------+-----------------------------+
  | 10       | 151        | asdf     | 1   |
  | 10       | 152        | test     | 2   |
  | 11       | 151        | 545      | 3   |
  | 12       | 151        | sdfsd    | 4   |
  | 12       | 152        | eewwe    | 5   |
  | 12       | 153        | dfsd     | 6   |
  </code></pre>
  
  <p>of course id must be unique throght all segments</p>