Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Difference between execute and fetch with a select-statement

Difference between execute and fetch with a select-statement

From: Christian Hartmann <cha_at_christian-hartmann.de>
Date: Tue, 06 Jan 2004 23:12:08 +0100
Message-ID: <gbcmvvcmqmjpf3bl4hu0unmrrradenhb7l@4ax.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US