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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: v$sql problem

Re: v$sql problem

From: <J.Velikanovs_at_alise.lv>
Date: Thu, 8 Jul 2004 16:42:04 +0300
Message-ID: <OFB81A9640.4D850EA4-ONC2256ECB.004A7AAC-C2256ECB.004BF4E8@alise.lv>


Hi!
> I think Oracle is doing latchless updates to these execution counts to
avoid
> contention/performance issues, that's how few of the incrementations
might
> get lost. However, losing nearly half of the updates seems somewhat
unlikely
> for a two session operation, so there might be some other issues.

I just wondered that is likelihood when EXECUTIONS can be lost. To get the answer I have made stupid testcase again ;) I have taken SQL
select COUNT(*) into vv from dual where 0=1; end executed it 1 000 000 times in 4 parallel processes (whole testcase source below).

Theoretically we need to get 4*1 000 000 executions I have made test twice on 2 different hosts

There are results.
TEST 1



1 x Intel(R) Pentium(R) 4 CPU 2.80GHz
Linux RH AS 2.1
3 999 919 ~ 2min (120 sec; 33332 exec/sec) Executions lost = 81

TEST 2



2 x The sparcv9 processor operates at 900 MHz, SPARC Solaris 5.8
3 999 462 ~ 4.5 min (270 sec; 14812 exec/sec) Executions lost = 538

Harvinder, as you can see likelihood is no so big ;) I have suspicions ether you have bug in your test or Oracle have bug in software.
What is HW specification you are running on?

Jurijs
9268222



http://otn.oracle.com/ocm/jvelikanovs.html

TESTCASE source:

CREATE OR REPLACE
PROCEDURE sys.testexec
as
vv NUMBER;
begin
for f in 1..1000000 loop
select COUNT(*) into vv from dual where 0=1; end loop;
end;
/

$ cat testexec.sh
sqlplus "/ as sysdba" <<!
begin
testexec;
end;
/
exit
!

$ cat run_all.sh

time ./testexec.sh &
time ./testexec.sh &
time ./testexec.sh &
time ./testexec.sh &






Tanel Põder <tanel.poder.003_at_mail.ee>
Sent by: oracle-l-bounce_at_freelists.org
08.07.2004 01:12
Please respond to oracle-l  

        To:     <oracle-l_at_freelists.org>
        cc: 
        Subject:        Re: v$sql problem


> I am testing the insert performance into a table from 2 sessions both
> reading from same table. I am inserting in a batch of 1000 rows at a
> time and in 1 session we are inserting 1000 batches so total 1M rows
> inserted. Also we are doing commit after every 1000 rows. When I check
> the view v$sql and run statement from only 1 session it shows executions
> as 1000 (for 1000 batches) and increment in 1000 for each run. But when
> I run both sessions concurrently it only increases the execution by 1010
> instead of 2000. Is this the normal stats or it is not showing execution
> stats properly?

I think Oracle is doing latchless updates to these execution counts to avoid
contention/performance issues, that's how few of the incrementations might get lost. However, losing nearly half of the updates seems somewhat unlikely
for a two session operation, so there might be some other issues.

Btw, what's your session_cached_cursors and cursor_space_for_time parameter's values? And which version/platform?

Tanel.



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------


----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request_at_freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Thu Jul 08 2004 - 08:47:44 CDT

Original text of this message

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