Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

oracle views and network traffic

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.

like image 228
cdummy Avatar asked Mar 22 '23 04:03

cdummy


1 Answers

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

like image 56
APC Avatar answered Apr 01 '23 10:04

APC