title: Does adding a foreign key to an indexed column boost performance?
body: <p>A colleague claims that he used foreign keys to optimize queries in past. I think that foreign keys are used only when inserting or updating data in a table. I don't see how they can be used to speed up the search.</p>
  
  <p>How can a foreign key help when creating an execution plan? Am I missing something? If so, then under what circumstances does it help?</p>
  
  <p>(We use PostgreSQL, which I don't have much experience with. Is it possible that it behaves differently than, say, Oracle or MySQL?)</p>