title: Optimal way to join three tables in SQLite
body: <p>A (simplified) database of Internet bookmarks. I thought it'd make sense to organize the tables logically, like so:</p>
  
  <pre><code>Bookmarks (id, title, url; basically external data)
  +------+------------+-----+
  | suid |   Title    | ... |
  +------+------------+-----+
  
  User (user-specific data: favorites, ratings, etc)
  +------+------------+-----+
  | suid | IsFavorite | ... |
  +      +  (0 or 1)  +     +
  +------+------------+-----+
  
  History (last used, use count etc)
  +------+------------+-----+
  | suid |  LastUsed  | ... |
  +      +(TDateTime) +     +
  +------+------------+-----+
  </code></pre>
  
  <p>('suid' is unique ID, integer primary key)</p>
  
  <p>From bookmarks flagged as <strong>favorite</strong> I need to select N <strong>most recently used</strong> (to populate a menu at runtime as a convenience).</p>
  
  <pre><code>SELECT Bookmarks.suid, Title from Bookmarks
      INNER JOIN User USING (suid)
      INNER JOIN History USING (suid)
      WHERE IsFavorite = 1
      ORDER BY LastUsed DESC
      LIMIT 15;
  </code></pre>
  
  <p>The statement works, and seems sufficiently readable, but is it optimal? The Bookmarks table is intended to hold 20-50k records on average (i.e, not your standard browser bookmark manager :-) The app will execute 3 or 4 similar statements at startup to populate controls. All fields used in the example are indexed.</p>
  
  <p>I'm teaching myself SQL and came up with the above code, but maybe I'm overlooking a syntax or an idiom that could improve it? </p>