From:Steve Adams
Date:03-Apr-2001 17:41
Subject:   Overhead in using views

Oracle does not cache view definitions in the library cache or dictionary cache. They have to be fetched from the data dictionary every time that a statement that references views is parsed. If this happens frequently enough, then the database blocks containing the view definitions may be retained in the buffer cache. Otherwise, physical I/O is required to read the view definition.

If the application is expected to parse new SQL statements consistently and has moderate to high concurrency requirements, then I would say that this overhead is significant enough to make you avoid the use of unnecessary views. Otherwise, it does not matter very much. I dislike any unnecessary overhead, so I would avoid the views anyway. If you later find a real reason to interpose views, then the RENAME command gives you an elegant way of introducing them without changing the code; so you may as well do without them at least initially.

Is there a huge overhead in using a view for all the tables in a schema? The goal is to let everybody query the views instead of the tables. The customer wants to do that because they used to do that with their old DB2 databases. There is not much use of doing that, but they want a very technical answer in the why not to do it anyway since they did it before.