Which stages are performed when the above block is executed?

View the Exhibit and examine the structure of the EMP table.

Which stages are performed when the above block is executed? (Choose all that apply)

View the Exhibit and examine the structure of the EMP table.

Which stages are performed when the above block is executed? (Choose all that apply)

A.
Bind

B.
Parse

C.
Fetch

D.
Execute



Leave a Reply 22

Your email address will not be published. Required fields are marked *


surprise

surprise

A,C,D. Parse does not occur because this code is static.

surprise

surprise

I was wrong.
Actually ALL the actions take place.

A – because reference to v_sal is used in the second statement.
B – every new static SQL statement must be parsed in order to establsih execution plan, rights and so on. In this case – all the statements are supposed to be new statements. So, they MUST be parsed.
C – obviously, first statement does fetch
D – obviously, execute always happens

sp

sp

B C D are correct, There are no bind variables. So it will not go into bind phase.

dirk

dirk

Ans: B C D
bind means HOST-Var.

Marian

Marian

A, B, C, D

S!d

S!d

only B,C,D are correct

Ramesh

Ramesh

Bind variable are not created in the declarative section of PL/Sql Block

Leo Yu

Leo Yu

sorry I don’t get you? What do you mean?

Alexey

Alexey

B,D

declare
lWellId number;
begin
select t.well_id into lWellId from well t where t.well_id = 2554670080;
insert into dam#_temp(id,num) values (lWellId,1);
end;

call count cpu elapsed disk query current rows
——- —— ——– ———- ———- ———- ———- ———-
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.01 0 0 0 1
Fetch 0 0.00 0.00 0 0 0 0
——- —— ——– ———- ———- ———- ———- ———-
total 2 0.00 0.01 0 0 0 1

roman

roman

B,C,D

DECLARE
v_sal NUMBER;
BEGIN
SELECT sal INTO v_sal FROM emp WHERE empno = 130;
INSERT INTO emp (empno,ename,sal) VALUES (185,’Jones’,v_sal+1000);
END;

call count cpu elapsed disk query current rows
——- —— ——– ———- ———- ———- ———- ———-
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 1
Fetch 0 0.00 0.00 0 0 0 0
——- —— ——– ———- ———- ———- ———- ———-
total 2 0.00 0.00 0 0 0 1

SQL ID: 20muw3wsswtg9 Plan Hash: 3956160932

SELECT SAL
FROM
EMP WHERE EMPNO = 130

call count cpu elapsed disk query current rows
——- —— ——– ———- ———- ———- ———- ———-
Parse 1 0.00 0.00 0 1 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.00 0.00 0 7 0 1
——- —— ——– ———- ———- ———- ———- ———-
total 3 0.00 0.00 0 8 0 1

SQL ID: ff2hkxsqxn8a3 Plan Hash: 0

INSERT INTO EMP (EMPNO,ENAME,SAL)
VALUES
(185,’Jones’,:B1 +1000)

call count cpu elapsed disk query current rows
——- —— ——– ———- ———- ———- ———- ———-
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 1 5 1
Fetch 0 0.00 0.00 0 0 0 0
——- —— ——– ———- ———- ———- ———- ———-
total 2 0.00 0.00 0 1 5 1

Andrey

Andrey

What utility do you use to show this statistytic?

Leo Yu

Leo Yu

tkprof

Leo Yu

Leo Yu

tkprof only has Parse, Execute and Fetch rows, it doesn’t mean there is no BIND phase.

Leo Yu

Leo Yu

The value of v_sal is supplied in the runtime, why bind phase is neglected?

Leo Yu

Leo Yu

all A,B, C, D are correct answers

nat

nat

nope correct is BCD
cause v_sal is not a bind variable.

Andy

Andy

A,B,C,D are correct answers.

Bind Variables
When you embed a SQL INSERT, UPDATE, DELETE, MERGE, or SELECT statement directly
in your PL/SQL code, the PL/SQL compiler turns the variables in the WHERE and
VALUES clauses into bind variables

http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/overview.htm#LNPLS129

Andy

Andy

Last week I passed the exam, and I had to choose only three stages. For that reason I selected BCD and it was correct.

PB

PB

Hi
Congrats on passing the test. If you’ve gone through this forum, then can you tell me if the corrections suggested by the comments section are correct?
I have to write mine this week and I’d like to know if this forum was helpful for your preparation.
Thank you.

suba

suba

Andy,I am going to written exam this week.Is this answers given by this site are exactly correct?
Each user give different answer, which one i pick

Fabio

Fabio

If you have to choose only three they are B, C and D. Because if you don’t have any empno with 130 the program raises an exception so never do the insert and accordingly never do the bind for v_sal.
Instead if you have empno 130 all four stages are performed.