title: ORA 01114 - IO Error writing block to file
body: <p>I am working on some compelex sql queries in Oracle 11g, which have aggregation functions like SUM and joins multiple tables and views. I am getting the IO Error and Tablespace insufficient space error when I try to query large span of data.</p>
  
  <p>Error no.1 is
  ORA-01114: IO Error writing block to file(block #)
  ORA-01114: IO Error writing block to file 201(block #1343798)
  ORA-27063: number of bytes read/written is incorrect</p>
  
  <p>Error no.2 Sometimes
  Database Running out of Temporary Space when loaddate > 12 months</p>
  
  <p>Is this an Oracle specific error that my DBA has to solve or something is wrong with my queries? How would I fine tune the performance of the queries to avoid insufficient tablespace prompt? I am writing a dummy sample of what my queries look like</p>
  
  <pre><code>SELECT Sum(s.stock + s.accept + s.new)    AS result, 
         Floor(( s.sales / s.stock ) * 100) AS sales_per,, 
         f.load_date,, 
         u.user_id, 
         Sum(s.falsepos + s.realvio)        AS closed_ale, 
         Sum(f.nbrecords)                   AS nb_records 
  FROM   stocks s, 
         facts f, 
         zones z, 
         users u 
  WHERE  s.sid = f.fid 
         AND z.zoneid = f.zoneid 
         AND u.userid = z.userid 
         AND f.load_date BETWEEN '20081010' AND '20121030' 
  </code></pre>