title: Oracle - Compile view too slow
body: <p>I have a view in oracle that can't compile. The view is really simple, with 6 tables (5 inner joins) and less then 10000 rows in query result.</p>
  
  <p>The view's query is like the example below.</p>
  
  <pre><code>CREATE OR REPLACE VIEW owner.X 
  as
  SELECT vpc.field_1, vpc.field_2
  FROM casp.table_0 bpc
  INNER JOIN owner.table_1 b
    ON b.id_bpc = bpc.id_bpc
  INNER JOIN owner.table_2 a
    ON a.id_b = b.id_b
  INNER JOIN owner.table_3 cb
    ON cb.id_a = a.id_cb
  INNER JOIN owner.table_4 cbw
    ON cbw.id_cb = cb.id_cb
  inner join owner.view_1 vpc
    ON bpc.id_bpc = vpc.id_bpc
  WHERE vpc.cod = 1
  </code></pre>
  
  <p>When I try to compile, the view start to processing, but the compilation never ends.</p>
  
  <p>If I take the query off and replace a table that exists from other that don't exists on my database, the server spend about 15sec just to return the error ORA-00942 (table or view does not exists). In a different database (development) is least the 1sec.</p>
  
  <p>I don't know what happend to the server to start this strange bug.</p>
  
  <p>The Oracle version is 10G.</p>