title: Do foreign key constraints influence query transformations in Oracle?
body: <p>I have a situation like this:</p>
  
  <pre><code>create table a(
    a_id number(38) not null,
    constraint pk_a primary key (id)
  );
  
  create table b(
    a_id number(38) not null
  );
  
  create index b_a_id_index on b(a_id);
  </code></pre>
  
  <p>Now <code>b.a_id</code> is in fact meant to be a foreign key referencing <code>a.a_id</code>, but it isn't formally declared as such. Obviously, it should be for integrity reasons. But does a foreign key constraint also improve join performance in general or in specific cases? If yes, for what types of query transformations?</p>
  
  <p>Is there any relevant documentation about this topic?</p>
  
  <p>I'm using Oracle 11g (11.2.0.2.0)</p>