13.5 Synonyms and Views

 < Day Day Up > 



Synonyms could potentially be used to help replace nested layers of views to enhance performance. Synonyms are also often used to allow creation of multiple users where access to data is pointed to a central schema. Profligate use of public synonyms can cause a security issue depending on what is granted to them; more important perhaps is potential contention in highly concurrent environments. On the other hand, there is little which does not result in contention in highly concurrent environments.

Using synonyms can have a similar effect to that of using views. Synonyms can help to organize but can ultimately cause metadata performance issues as a result of the extra layers of metadata. Generally, using views will always create performance problems, especially where there are multiple layers of views. Large amounts of metadata can cause problems in the shared pool and degrade the performance of the Optimizer with too much complexity, especially with multiple layers of views and synonyms.

Synonyms and views are often used for similar reasons. Views and synonyms are often used when a database is designed and built from the top down and the perspective of an application. A relational database has simplistic structure. Applications can handle complexity that relational database structure is not intended for. As a side issue an object database can handle complexity. Extensive use of views and synonyms is common for applications tending to attempt to overuse relational database structure, imposing complex structure onto that relational database. In other words, do not overuse views and synonyms to simplify application coding. Performance of your application will suffer immensely in the long run if too many layers of complexity are imposed on the database layer. A relational database is intended to organize, store, allow changes to and retrieve data. A relational database does not have the processing power of an application tool. Keep complex application functionality out of the database if you want good performance. A similar approach should apply to PL/SQL. Use PL/SQL to access data, not to perform nondata accessing calculations and processing. The Oracle Java JVM can be utilized for complex processing.

Views can be used to implement security. The biggest issue with views is that any filtering executed on a query of a view is applied to the result of the view. The query executed within a view will always be executed in its entirety, regardless of filtering on the query executed against the view.

Be careful using synonyms and views.



 < Day Day Up > 



Oracle High Performance Tuning for 9i and 10g
Oracle High Performance Tuning for 9i and 10g
ISBN: 1555583059
EAN: 2147483647
Year: 2003
Pages: 164

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net