nerdexam
Oracle

1Z0-061 · Question #311

Consider these three statements: create view v1 as select department_id,department_name,last_name from departments join employees using (department_id); select department_name,last_name from v1…

The correct answer is D. Sad but true. Views do not help performance. A is wrong because a view is only a SELECT statement; it doesn't prerun the query. B is wrong because the Oracle optimizer will sort out any differences in syntax. C is wrong because, although views are precompiled, this doesn't affect the speed of compiling a user's statement.

Creating Other Schema Objects

Question

Consider these three statements:

create view v1 as select department_id,department_name,last_name from departments join employees using (department_id); select department_name,last_name from v1 where department_id=20; select d.department_name,e.last_name from departments d, employees ewhere d.department_id=e.department_id and d.department_id=20; The first query will be quicker than the second because (choose the best answer):

Options

  • AThe view has already done the work of joining the tables.
  • BThe view uses ISO standard join syntax, which is faster than the Oracle join syntax used in the
  • CThe view is precompiled, so the first query requires less dynamic compilation than the second
  • DSad but true. Views do not help performance.

How the community answered

(38 responses)
  • A
    11% (4)
  • B
    5% (2)
  • C
    3% (1)
  • D
    82% (31)

Explanation

A is wrong because a view is only a SELECT statement; it doesn't prerun the query. B is wrong because the Oracle optimizer will sort out any differences in syntax. C is wrong because, although views are precompiled, this doesn't affect the speed of compiling a user's statement.

Topics

#view performance#view execution plan#view precompilation#Oracle join syntax

Community Discussion

No community discussion yet for this question.

Full 1Z0-061 Practice