SQL Performance (MOSC)

MOSC Banner

Autotrace query results question

edited Feb 12, 2015 10:10AM in SQL Performance (MOSC) 2 commentsAnswered

Hi All,

I am trying to understand the difference between the results of my autotrace  (see results attached)

I am basically running a very simple query, and although the differences don't seem drastic I want to get a handle on the results:

The 2 queries are:

Query 1 -->     select 'x' from dual where exists (select 'x' from codeuser where cdus_user = user);

Query 2 -->     select count(*) from codeuser where cdus_user = user;

The CPU cost is more on the Query 1, although it seems to be reading less bytes.

The CPU cost is less on Query 2 plus it seems to be sending less over the network (bytes sent via sql*net to client). During the executing phase it seems to be reading more bytes.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center