oracle views and network traffic

∥☆過路亽.° 提交于 2019-12-10 17:08:45

问题


I cant really understand what this line from the Oracle E-Business Suite Developer's Guide means. When using views, "network traffic is minimized because all foreign keys are denormalized on the server."

Could anyone please throw some light on when a query, associated with a view is parsed?
Is a query associated with a view is already parsed?

I cant find the answers. Please provide any oracle documentation links that would be helpful.


回答1:


The quote is talking about E-Business Suite, and specifically, how to build EBS (i.e. Forms) applications in a performant fashion. The pertinent context is this:

"In general, complex blocks are based on views while simple setup blocks are based on tables."

Take this scenario: we have a table with many columns, including three which are foreign keys to lookup tables. We want to display data from this table in a Form. To be user-friendly our Form needs to show the meanings from the lookup tables not the codes from the main table. It is more efficient to execute a single query joining to the reference tables than to issue four queries. Because network traffic, and other considerations.

So we should build the Form's data block on a view which joins all four tables, rather than building it just on the main table and using Post-Query triggers to issue three separate queries which retrieve the codes' descriptions. This is especially relevant with multi-row blocks: we definitely want to avoid issuing several queries for each record returned.

Although the context for the quote is Oracle Forms, the point pertinent for most data retrieval applications. Although I suspect these days using a ref cursor to pass a result set is a more popular solution than using views.

tl;dr

It is a statement about application design not database optimization



来源:https://stackoverflow.com/questions/20812405/oracle-views-and-network-traffic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!