title: Materialized view created successfully but giving query too long error on refreshing
body: <p>I have created a materialized view. </p>
  
  <pre><code>CREATE MATERIALIZED VIEW apps.RPRO_BILLED_CONTRACTS_MV
  REFRESH COMPLETE
  START WITH SYSDATE
  NEXT (sysdate+1/1440) with rowid
  AS "query";
  </code></pre>
  
  <p>it got created successfully and is returning rows on select * operation.
  However I wanted to check whether it is refreshing or not and turns out it was not.
  I ran the manual refresh command as :</p>
  
  <pre><code>BEGIN
  DBMS_SNAPSHOT.REFRESH('RPRO_BILLED_CONTRACTS_MV');
  end;
  </code></pre>
  
  <p>Now this returns error:
  Error report</p>
  
  <pre><code>ORA-32411: materialized view definition query exceeds the maximum length
  ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2563
  ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2776
  ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2745
  ORA-06512: at line 2
  
  32411. 0000 -  "materialized view definition query exceeds the maximum length"
  *Cause:    The materialized view definition query exceeds the 64K limit.
  *Action:   Change the materialized view definition query so that it does not exceed
             the maximum length of 64K.
  </code></pre>
  
  <p>I'm confused, if the query is too long, how come the view got created and returning values but not refreshing. Please help.</p>