Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Difference between execute and fetch with a select-statement
Hi there,
I should mention that I use an Oracle 9.2.0.4 database with OPTIMIZER_MODE=FIRST_ROWS. as for my understanding if I let run an SQL-Select-Statement "execute" does tis:
The actual execution of the statement - For insert, update, and delete statements it writes the Before Image, writes the After Image, sets Dirty-Flag in Database-Buffer, and writes RedoLog Information. For select statements this identifies the selected rows.
Whereas fetch does this:
This retrieves rows returned by a query.
To be honest, I am a little bit confused about that.
How does "execute" identify the selected rows? Are the indexes - which might be there - already used during the "execute"-phase or not?
And how does the "fetch"-phase "knows" which rows to retrieve? Are the indexes used here to retrieve the rows?
Any technical help will be appreciated!
Regards,
Christian Hartmann Received on Tue Jan 06 2004 - 16:12:08 CST
![]() |
![]() |