The Raw vs. Cooked Files Debate

Another question that often arises is whether to use raw or cooked files. The answer here is very simple: Use cooked files. The only time to use raw files is for OPS as it is a key requirement.

Raw files offer two performance improvements: asynchronous I/O and no double-caching (i.e., caching of data in Oracle SGA and UNIX file system cache). Quite often, the realized performance gain is relatively small. Some sources say 5?10%, while others wildly claim 50%. There really is no universal consensus on what the real performance gains are for using raw files. However, nearly everyone agrees that raw generally requires more skilled and well-trained administrative staff because none of the standard UNIX file system commands and many backup/recovery suites do not function with raw files. Thus, the administrative headaches alone are reason enough to avoid raw files like the plague.

Again, if you've accepted the prior recommendation for Sun hardware, then there is a clear answer: Use cooked files. Solaris supports asynchronous I/O to both raw and file system data files. The only real penalty is double-caching of data.

If you genuinely believe that you need the performance gain raw files supposedly offer, then I strongly suggest looking at the Veritas file system with its Quick IO feature. Quick IO supports asynchronous I/O and eliminates double-caching. In short, Oracle accesses database files as if they were raw even though the DBA manages them as if they were regular files. Essentially, Quick IO provides a character-mode device driver and a file system namespace mechanism. For more information, I suggest reading the white paper titled "Veritas Quick IO: Equivalent to raw volumes, yet easier." It can be found on Veritas' Web site (, under white papers).

The Veritas file system also supports online file system backups, which can be used to perform online incremental database backups. Furthermore, Veritas' online incremental backup is vastly superior to using Oracle's RMAN. The key difference is that Oracle's RMAN must scan all the blocks during an online incremental database backup to see which blocks have changed. RMAN saves magnetic tapes at the expense of time. The Veritas online incremental database backup knows which blocks have changed via its file system redo logs, so it saves both tape space and time. Finally, Veritas offers one of the easiest to manage UNIX file systems and backup/recovery suites available. Unfortunately, Veritas is only available for Solaris and HP-UX.

As another point of reference, I did my last data warehouse using raw files. I also do not own any shares of Veritas stock. And, I honestly do not feel like I am making this recommendation based on any personal prejudices.