Examine the following code:
Which two statements are true about the above function? (Choose two.)
A.
It can be used only in a parallelized query.
B.
It can be used in both a parallelized query and a parallelized DML statement.
C.
It can be used only in a parallelized data manipulation language (DML) statement.
D.
It can have a separate copy run in each of the multiple processes when called from a SQL statement that is run in parallel.
E.
It requires a PRAGMA RESTRICT_REFERENCES declaration with RNDS, WNDS, RNPS, and WNPS specified in order to use parallel optimization.
hi
answer B seem correct.
to understand why answer E i correct, please, i need help.
i know that pragma restrict_references is deprecated, and you can use it to see prior, at compilation time, i there are problems, that you could otherwise see ate execution time.
SO, please, why it is required for parallel_enaled, and please, can you give me an example about to use it ?
hi
answer B seem correct.
to understand why answer E is correct too, please, i need help.
i know that pragma restrict_references is deprecated, and you can use it to see prior, at compilation time, i there are problems, that you could otherwise see ate execution time.
SO, please, why it is required for parallel_enaled, and please, can you give me an example about to use it ?
I think it’s b and d. Regarding e i didnt find any hint in oracle docs.
I think B and D
PARALLEL_ENABLE
This option declares that a stored function can be used safely in the slave sessions of parallel DML evaluations. The state of a main (logon) session is never shared with slave sessions. Each slave session has its own state, which is initialized when the session begins. The function result should not depend on the state of session (static) variables. Otherwise, results might vary across sessions.
It’s B and E.
http://docs.oracle.com/cd/E11882_01/server.112/e25523/parallel003.htm#VLDBG1473
B E is the answer:
1_ The PARALLEL_ENABLE keyword can be used in the syntax for declaring a function. It is an optimization hint that indicates that the function can be used in a parallelized query or parallelized DML statement.
2_ For DML statements, before Oracle8i, the parallelization optimization looked to see whether a function was noted as having all four of RNDS, WNDS, RNPS, and WNPS specified in a PRAGMA RESTRICT_REFERENCES declaration;
B and E for sure.
In a SELECT statement or a subquery in a DML or DDL statement, a user-written function may be executed in parallel in any of the following cases:
* If it has been declared with the PARALLEL_ENABLE keyword
* If it is declared in a package or type and has a PRAGMA RESTRICT_REFERENCES clause that indicates all of WNDS, RNPS, and WNPS
* If it is declared with CREATE FUNCTION and the system can analyze the body of the PL/SQL code and determine that the code neither writes to the database nor reads or modifies package variables
B and D
In Oracle 11g PRAGMA RESTRICT_REFERENCES is only for backward compatibility. PARALLEL_ENABLE and DETERMINISTIC must be used, provided that the function cause no side effects (no change to package state or data state).
So B and D.
Sorry I forgot to cite the source:
http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/restrictreferences_pragma.htm#LNPLS01339
Why noy C and D??
http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_5009.htm#SQLRF01208
B for sure
The execution of a SQL statement can involve many distinct actions (for example, updating multiple indexes on an INSERT). Oracle’s parallel execution feature allows these multiple operations to be executed simultaneously on different processes. If a function is called in a SQL statement that is run in parallel, then Oracle may make and run a separate copy of the function in each process.
It signifies ans is D
Prior to Oracle8i, a packaged function could be run in a parallel DML statement if its RESTRICT_REFERENCES pragma asserted all purity levels: WNDS, RNDS, WNPS, and RNPS. Those same purity levels also needed to be applicable to a standalone function if it were to be called in parallelized SQL. A parallel query required RNPS and WNPS, in addition to WNDS.
is for packaged function SO E is wrong
And is B and D
Thanks Jyoti, think yours is the best explaination: parallel_enable could apply to query and DML. PRAGMA RESTRICT_REFERENCE applying all four types of restrict reference, for parrallel query, only two of the four restrictions are requested(think it is no database server access and package variable access); for parrallel DML, all of the four restrictions are requested. For parallel query or DML, each slave process have one copy of parent process state.
I believe. Your’s is best.
B,E
b,d
E is incorrect:
http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/restrictreferences_pragma.htm#LNPLS01339
B and D
Agree with Sergio.
B and D. Oracle’s parallel execution feature divides the work of executing a SQL statement across multiple processes. And PRAGMA RESTRICT_REFERENCES is optional in this case
B and D are correct
I go to see daily a few web sites and blogs to read articles or reviews, however this webpage presents feature based writing.|
Admiring the commitment you put into your blog and detailed information you provide. It’s nice to come across a blog every once in a while that isn’t the same out of date rehashed material. Fantastic read! I’ve saved your site and I’m including your RSS feeds to my Google account.|
This design is steller! You certainly know how to keep a reader entertained. Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Fantastic job. I really loved what you had to say, and more than that, how you presented it. Too cool!|
wht is correct ans regarding the 11g plsql??/
anyone help quick
RESTRICT_REFERENCES Pragma
•This pragma can appear only in a package specification or ADT specification