title: MySQL Views and index use
body: <p>I was thinking of starting to utilize views to reduce the complexity of code and queries in our project -- some of them have a few joins, and from what I understand, MySQL views would allow us to reference that data a little easier in multiple places. </p>
  
  <p>There's a lot of stuff being thrown around, where "MySQL doesn't use indexes for views", "You can't have an indexed view", "Only if you use MERGE"... There is no clear-cut answer.</p>
  
  <p>So, to cut to the chase: <strong>Do MySQL views use indexes <em>on the tables they are built from</em>?</strong> Is it a bad idea to use views at all because performance will be abysmal, or will it use the indexes on the underlying tables when doing its joins? If I sort a view by a column that is indexed in the table, does it still sort as fast as it normally would?</p>
  
  <p>Doing my research seems to indicate that views don't use indexes, but if that was the case nobody would ever use them; obviously people do, so...?</p>
  
  <p>Sorry if this seems kind of absurd.</p>