Significant performance change in spatial join

Hi,
I have 2 spatial tables in Oracle 10g: one (PT_SOURCE) has a point column with over a half million records and another (TRJ_TMP_BUF) has a polygon column with 2 records. 2 spatial R-tree indexes were built on the 2 table respectively. I tried a spatial join to see how many points fall into one polygon. The SQL statement is:
SELECT a.id, d.name FROM pt_source a, trj_tmp_buf b, TABLE (SDO_JOIN('PT_SOURCE', 'SHAPE', 'TRJ_TMP_BUF', 'SHAPE', 'mask=ANYINTERACT')) c, pollution_source d WHERE c.rowid1 = a.rowid AND c.rowid2 = b.rowid and d.id=a.id
The first a couple of run of the query took about 2 and a half hours to complete. 2 days after I tried the same query again. It only took about 2 minutes to complete! I'm pretty sure that the workload of the server was in the same level as in the first run. I'm wondering if there is something going on with the spatial indexes that may cause such significant improvement.
BTW, I imported the same data set into another server that is configured similarly and runs another instance of Oracle 10g. All the spatial indexes were built. This time the same query took about 2 hours to complete. Does any body have any explanation about this? Thanks in advance.

Hi, Dan,
I'm sorry that I made a mistake in the file names. The second trace file is for the database that is faster.
I set a less file size for the second trace file. That might be why its space was limited. I ran the query again and set the file size to 5 MB (the same as for the first trace file). The newly generated trace file for the faster database is as following:
TKPROF: Release 10.1.0.3.0 - Production on Tue May 10 22:50:51 2005
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Trace file: airpltn_ora_19874_gis23Test2.trc
Sort options: default
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
alter session set sql_trace=true
call count cpu elapsed disk query current rows
Parse 0 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
total 1 0.00 0.00 0 0 0 0
Misses in library cache during parse: 0
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 58 (APPDEV)
select t.ts#,t.file#,t.block#,nvl(t.bobj#,0),nvl(t.tab#,0),t.intcols,
nvl(t.clucols,0),t.audit$,t.flags,t.pctfree$,t.pctused$,t.initrans,
t.maxtrans,t.rowcnt,t.blkcnt,t.empcnt,t.avgspc,t.chncnt,t.avgrln,
t.analyzetime,t.samplesize,t.cols,t.property,nvl(t.degree,1),
nvl(t.instances,1),t.avgspc_flb,t.flbcnt,t.kernelcols,nvl(t.trigflag, 0),
nvl(t.spare1,0),nvl(t.spare2,0),t.spare4,t.spare6,ts.cachedblk,ts.cachehit,
ts.logicalread
from
tab$ t, tab_stats$ ts where t.obj#= :1 and t.obj# = ts.obj# (+)
call count cpu elapsed disk query current rows
Parse 10 0.00 0.00 0 0 0 0
Execute 20 0.01 0.00 0 0 0 0
Fetch 20 0.02 0.00 0 82 0 20
total 50 0.03 0.01 0 82 0 20
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 2)
Rows Row Source Operation
3 NESTED LOOPS OUTER (cr=12 pr=0 pw=0 time=1001 us)
3 TABLE ACCESS CLUSTER OBJ#(4) (cr=9 pr=0 pw=0 time=728 us)
3 INDEX UNIQUE SCAN OBJ#(3) (cr=6 pr=0 pw=0 time=334 us)(object id 3)
0 TABLE ACCESS BY INDEX ROWID OBJ#(671) (cr=3 pr=0 pw=0 time=198 us)
0 INDEX RANGE SCAN OBJ#(672) (cr=3 pr=0 pw=0 time=160 us)(object id 672)
select i.obj#,i.ts#,i.file#,i.block#,i.intcols,i.type#,i.flags,i.property,
i.pctfree$,i.initrans,i.maxtrans,i.blevel,i.leafcnt,i.distkey,i.lblkkey,
i.dblkkey,i.clufac,i.cols,i.analyzetime,i.samplesize,i.dataobj#,
nvl(i.degree,1),nvl(i.instances,1),i.rowcnt,mod(i.pctthres$,256),
i.indmethod#,i.trunccnt,nvl(c.unicols,0),nvl(c.deferrable#+c.valid#,0),
nvl(i.spare1,i.intcols),i.spare4,i.spare2,i.spare6,decode(i.pctthres$,null,
null,mod(trunc(i.pctthres$/256),256)),ist.cachedblk,ist.cachehit,
ist.logicalread
from
ind$ i, ind_stats$ ist, (select enabled, min(cols) unicols,
min(to_number(bitand(defer,1))) deferrable#,min(to_number(bitand(defer,4)))
valid# from cdef$ where obj#=:1 and enabled > 1 group by enabled) c where
i.obj#=c.enabled(+) and i.obj# = ist.obj#(+) and i.bo#=:1
call count cpu elapsed disk query current rows
Parse 10 0.00 0.00 0 0 0 0
Execute 23 0.01 0.00 0 0 0 0
Fetch 58 0.04 0.03 0 189 0 35
total 91 0.05 0.04 0 189 0 35
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 2)
Rows Row Source Operation
7 HASH JOIN OUTER (cr=30 pr=0 pw=0 time=5363 us)
7 NESTED LOOPS OUTER (cr=21 pr=0 pw=0 time=1211 us)
7 TABLE ACCESS CLUSTER OBJ#(19) (cr=16 pr=0 pw=0 time=834 us)
3 INDEX UNIQUE SCAN OBJ#(3) (cr=6 pr=0 pw=0 time=302 us)(object id 3)
0 TABLE ACCESS BY INDEX ROWID OBJ#(673) (cr=5 pr=0 pw=0 time=252 us)
0 INDEX UNIQUE SCAN OBJ#(674) (cr=5 pr=0 pw=0 time=170 us)(object id 674)
1 VIEW (cr=9 pr=0 pw=0 time=1563 us)
1 SORT GROUP BY (cr=9 pr=0 pw=0 time=1522 us)
1 TABLE ACCESS CLUSTER OBJ#(31) (cr=9 pr=0 pw=0 time=775 us)
3 INDEX UNIQUE SCAN OBJ#(30) (cr=6 pr=0 pw=0 time=339 us)(object id 30)
select name,intcol#,segcol#,type#,length,nvl(precision#,0),decode(type#,2,
nvl(scale,-127/*MAXSB1MINAL*/),178,scale,179,scale,180,scale,181,scale,182,
scale,183,scale,231,scale,0),null$,fixedstorage,nvl(deflength,0),default$,
rowid,col#,property, nvl(charsetid,0),nvl(charsetform,0),spare1,spare2,
nvl(spare3,0)
from
col$ where obj#=:1 order by intcol#
call count cpu elapsed disk query current rows
Parse 13 0.00 0.00 0 0 0 0
Execute 30 0.01 0.00 0 0 0 0
Fetch 432 0.01 0.02 0 93 0 402
total 475 0.02 0.03 0 93 0 402
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 2)
Rows Row Source Operation
25 SORT ORDER BY (cr=9 pr=0 pw=0 time=1334 us)
25 TABLE ACCESS CLUSTER OBJ#(21) (cr=9 pr=0 pw=0 time=704 us)
3 INDEX UNIQUE SCAN OBJ#(3) (cr=6 pr=0 pw=0 time=283 us)(object id 3)
select type#,blocks,extents,minexts,maxexts,extsize,extpct,user#,iniexts,
NVL(lists,65535),NVL(groups,65535),cachehint,hwmincr, NVL(spare1,0),
NVL(scanhint,0)
from
seg$ where ts#=:1 and file#=:2 and block#=:3
call count cpu elapsed disk query current rows
Parse 8 0.00 0.00 0 0 0 0
Execute 8 0.00 0.00 0 0 0 0
Fetch 8 0.00 0.00 0 24 0 8
total 24 0.00 0.00 0 24 0 8
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
0 TABLE ACCESS CLUSTER SEG$ (cr=0 pr=0 pw=0 time=0 us)
0 INDEX UNIQUE SCAN I_FILE#_BLOCK# (cr=0 pr=0 pw=0 time=0 us)(object id 9)
select owner#,name,namespace,remoteowner,linkname,p_timestamp,p_obj#,
nvl(property,0),subname,d_attrs
from
dependency$ d, obj$ o where d_obj#=:1 and p_obj#=obj#(+) order by order#
call count cpu elapsed disk query current rows
Parse 42 0.00 0.01 0 0 0 0
Execute 42 0.01 0.01 0 0 0 0
Fetch 197 0.06 0.02 0 487 0 155
total 281 0.07 0.05 0 487 0 155
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
4 SORT ORDER BY (cr=13 pr=0 pw=0 time=806 us)
4 NESTED LOOPS OUTER (cr=13 pr=0 pw=0 time=729 us)
4 TABLE ACCESS BY INDEX ROWID DEPENDENCY$ (cr=3 pr=0 pw=0 time=267 us)
4 INDEX RANGE SCAN I_DEPENDENCY1 (cr=2 pr=0 pw=0 time=160 us)(object id 120)
4 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=10 pr=0 pw=0 time=313 us)
4 INDEX UNIQUE SCAN I_OBJ1 (cr=6 pr=0 pw=0 time=171 us)(object id 36)
select order#,columns,types
from
access$ where d_obj#=:1
call count cpu elapsed disk query current rows
Parse 42 0.00 0.01 0 0 0 0
Execute 42 0.02 0.00 0 0 0 0
Fetch 123 0.03 0.00 0 246 0 81
total 207 0.05 0.02 0 246 0 81
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 TABLE ACCESS BY INDEX ROWID ACCESS$ (cr=8 pr=0 pw=0 time=220 us)
3 INDEX RANGE SCAN I_ACCESS1 (cr=5 pr=0 pw=0 time=232 us)(object id 122)
select col#, grantee#, privilege#,max(mod(nvl(option$,0),2))
from
objauth$ where obj#=:1 and col# is not null group by privilege#, col#,
grantee# order by col#, grantee#
call count cpu elapsed disk query current rows
Parse 12 0.00 0.00 0 0 0 0
Execute 16 0.01 0.00 0 0 0 0
Fetch 16 0.00 0.00 0 32 0 0
total 44 0.01 0.00 0 32 0 0
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
0 SORT GROUP BY (cr=2 pr=0 pw=0 time=257 us)
0 TABLE ACCESS BY INDEX ROWID OBJ#(85) (cr=2 pr=0 pw=0 time=156 us)
0 INDEX RANGE SCAN OBJ#(102) (cr=2 pr=0 pw=0 time=136 us)(object id 102)
select grantee#,privilege#,nvl(col#,0),max(mod(nvl(option$,0),2))
from
objauth$ where obj#=:1 group by grantee#,privilege#,nvl(col#,0) order by
grantee#
call count cpu elapsed disk query current rows
Parse 12 0.00 0.00 0 0 0 0
Execute 36 0.01 0.00 0 0 0 0
Fetch 66 0.02 0.01 0 107 0 30
total 114 0.03 0.02 0 107 0 30
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
0 SORT GROUP BY (cr=2 pr=0 pw=0 time=213 us)
0 TABLE ACCESS BY INDEX ROWID OBJ#(85) (cr=2 pr=0 pw=0 time=119 us)
0 INDEX RANGE SCAN OBJ#(102) (cr=2 pr=0 pw=0 time=102 us)(object id 102)
select col#,intcol#,toid,version#,packed,intcols,intcol#s,flags, synobj#,
nvl(typidcol#, 0)
from
coltype$ where obj#=:1 order by intcol# desc
call count cpu elapsed disk query current rows
Parse 11 0.01 0.01 0 0 0 0
Execute 14 0.03 0.02 0 0 0 0
Fetch 32 0.00 0.00 0 45 0 18
total 57 0.04 0.03 0 45 0 18
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 SORT ORDER BY (cr=3 pr=0 pw=0 time=362 us)
3 TABLE ACCESS CLUSTER OBJ#(281) (cr=3 pr=0 pw=0 time=188 us)
1 INDEX UNIQUE SCAN OBJ#(3) (cr=2 pr=0 pw=0 time=101 us)(object id 3)
select /*+ rule */ bucket_cnt, row_cnt, cache_cnt, null_cnt, timestamp#,
sample_size, minimum, maximum, distcnt, lowval, hival, density, col#,
spare1, spare2, avgcln
from
hist_head$ where obj#=:1 and intcol#=:2
call count cpu elapsed disk query current rows
Parse 7 0.00 0.00 0 0 0 0
Execute 99 0.02 0.01 0 0 0 0
Fetch 99 0.04 0.01 0 291 0 91
total 205 0.06 0.03 0 291 0 91
Misses in library cache during parse: 0
Optimizer mode: RULE
Parsing user id: SYS (recursive depth: 2)
Rows Row Source Operation
13 TABLE ACCESS BY INDEX ROWID OBJ#(214) (cr=39 pr=0 pw=0 time=2198 us)
13 INDEX RANGE SCAN OBJ#(216) (cr=26 pr=0 pw=0 time=1368 us)(object id 216)
select /*+ rule */ bucket, endpoint, col#, epvalue
from
histgrm$ where obj#=:1 and intcol#=:2 and row#=:3 order by bucket
call count cpu elapsed disk query current rows
Parse 4 0.00 0.00 0 0 0 0
Execute 27 0.00 0.00 0 0 0 0
Fetch 27 0.01 0.01 0 81 0 432
total 58 0.01 0.01 0 81 0 432
Misses in library cache during parse: 0
Optimizer mode: RULE
Parsing user id: SYS (recursive depth: 2)
Rows Row Source Operation
161 SORT ORDER BY (cr=30 pr=0 pw=0 time=3997 us)
161 TABLE ACCESS CLUSTER OBJ#(212) (cr=30 pr=0 pw=0 time=2430 us)
10 INDEX UNIQUE SCAN OBJ#(211) (cr=20 pr=0 pw=0 time=701 us)(object id 211)
select intcol#, toid, version#, intcols, intcol#s, flags, synobj#
from
subcoltype$ where obj#=:1 order by intcol# asc
call count cpu elapsed disk query current rows
Parse 11 0.01 0.00 0 0 0 0
Execute 14 0.01 0.00 0 0 0 0
Fetch 14 0.01 0.00 0 45 0 0
total 39 0.03 0.00 0 45 0 0
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
0 SORT ORDER BY (cr=3 pr=0 pw=0 time=254 us)
0 TABLE ACCESS CLUSTER OBJ#(284) (cr=3 pr=0 pw=0 time=177 us)
1 INDEX UNIQUE SCAN OBJ#(3) (cr=2 pr=0 pw=0 time=91 us)(object id 3)
select col#,intcol#,ntab#
from
ntab$ where obj#=:1 order by intcol# asc
call count cpu elapsed disk query current rows
Parse 11 0.00 0.00 0 0 0 0
Execute 14 0.00 0.00 0 0 0 0
Fetch 14 0.00 0.00 0 14 0 0
total 39 0.00 0.00 0 14 0 0
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
0 TABLE ACCESS BY INDEX ROWID OBJ#(351) (cr=1 pr=0 pw=0 time=144 us)
0 INDEX RANGE SCAN OBJ#(353) (cr=1 pr=0 pw=0 time=124 us)(object id 353)
select l.col#, l.intcol#, l.lobj#, l.ind#, l.ts#, l.file#, l.block#, l.chunk,
l.pctversion$, l.flags, l.property, l.retention, l.freepools
from
lob$ l where l.obj# = :1 order by l.intcol# asc
call count cpu elapsed disk query current rows
Parse 14 0.00 0.00 0 0 0 0
Execute 14 0.00 0.00 0 0 0 0
Fetch 24 0.00 0.00 0 45 0 10
total 52 0.00 0.01 0 45 0 10
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
2 SORT ORDER BY (cr=3 pr=0 pw=0 time=318 us)
2 TABLE ACCESS CLUSTER LOB$ (cr=3 pr=0 pw=0 time=168 us)
1 INDEX UNIQUE SCAN I_OBJ# (cr=2 pr=0 pw=0 time=95 us)(object id 3)
select o.owner#,o.name,o.namespace,o.remoteowner,o.linkname,o.subname,
o.dataobj#,o.flags
from
obj$ o where o.obj#=:1
call count cpu elapsed disk query current rows
Parse 7 0.00 0.00 0 0 0 0
Execute 27 0.00 0.00 0 0 0 0
Fetch 27 0.00 0.00 0 81 0 27
total 61 0.00 0.01 0 81 0 27
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 2)
Rows Row Source Operation
2 TABLE ACCESS BY INDEX ROWID OBJ#(18) (cr=6 pr=0 pw=0 time=313 us)
2 INDEX UNIQUE SCAN OBJ#(36) (cr=4 pr=0 pw=0 time=189 us)(object id 36)
select col#,intcol#,reftyp,stabid,expctoid
from
refcon$ where obj#=:1 order by intcol# asc
call count cpu elapsed disk query current rows
Parse 11 0.00 0.00 0 0 0 0
Execute 14 0.00 0.00 0 0 0 0
Fetch 14 0.00 0.00 0 14 0 0
total 39 0.00 0.00 0 14 0 0
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
0 TABLE ACCESS BY INDEX ROWID OBJ#(361) (cr=1 pr=0 pw=0 time=158 us)
0 INDEX RANGE SCAN OBJ#(363) (cr=1 pr=0 pw=0 time=133 us)(object id 363)
select col#,intcol#,charsetid,charsetform
from
col$ where obj#=:1 order by intcol# asc
call count cpu elapsed disk query current rows
Parse 11 0.01 0.00 0 0 0 0
Execute 14 0.00 0.00 0 0 0 0
Fetch 372 0.00 0.00 0 45 0 358
total 397 0.01 0.01 0 45 0 358
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
9 SORT ORDER BY (cr=3 pr=0 pw=0 time=338 us)
9 TABLE ACCESS CLUSTER OBJ#(21) (cr=3 pr=0 pw=0 time=219 us)
1 INDEX UNIQUE SCAN OBJ#(3) (cr=2 pr=0 pw=0 time=93 us)(object id 3)
select intcol#,type,flags,lobcol,objcol,extracol,schemaoid, elemnum
from
opqtype$ where obj# = :1 order by intcol# asc
call count cpu elapsed disk query current rows
Parse 11 0.00 0.00 0 0 0 0
Execute 14 0.00 0.00 0 0 0 0
Fetch 14 0.00 0.00 0 14 0 0
total 39 0.00 0.00 0 14 0 0
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
0 TABLE ACCESS BY INDEX ROWID OBJ#(364) (cr=1 pr=0 pw=0 time=145 us)
0 INDEX RANGE SCAN OBJ#(365) (cr=1 pr=0 pw=0 time=127 us)(object id 365)
select pos#,intcol#,col#,spare1,bo#,spare2
from
icol$ where obj#=:1
call count cpu elapsed disk query current rows
Parse 11 0.01 0.00 0 0 0 0
Execute 35 0.00 0.00 0 0 0 0
Fetch 75 0.00 0.00 0 150 0 40
total 121 0.01 0.01 0 150 0 40
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
3 TABLE ACCESS BY INDEX ROWID OBJ#(20) (cr=20 pr=0 pw=0 time=942 us)
3 INDEX RANGE SCAN OBJ#(40) (cr=17 pr=0 pw=0 time=732 us)(object id 40)
select metadata
from
kopm$ where name='DB_FDO'
call count cpu elapsed disk query current rows
Parse 1 0.01 0.01 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.00 0.00 0 2 0 1
total 3 0.01 0.01 0 2 0 1
Misses in library cache during parse: 1
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
1 TABLE ACCESS BY INDEX ROWID KOPM$ (cr=2 pr=0 pw=0 time=140 us)
1 INDEX UNIQUE SCAN I_KOPM1 (cr=1 pr=0 pw=0 time=83 us)(object id 350)
select obj#,type#,ctime,mtime,stime,status,dataobj#,flags,oid$, spare1,
spare2
from
obj$ where owner#=:1 and name=:2 and namespace=:3 and remoteowner is null
and linkname is null and subname is null
call count cpu elapsed disk query current rows
Parse 9 0.00 0.00 0 0 0 0
Execute 34 0.00 0.00 0 0 0 0
Fetch 34 0.00 0.00 0 94 0 26
total 77 0.00 0.01 0 94 0 26
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
1 TABLE ACCESS BY INDEX ROWID OBJ#(18) (cr=5 pr=0 pw=0 time=403 us)
1 INDEX RANGE SCAN OBJ#(37) (cr=4 pr=0 pw=0 time=293 us)(object id 37)
select node,owner,name
from
syn$ where obj#=:1
call count cpu elapsed disk query current rows
Parse 8 0.00 0.00 0 0 0 0
Execute 10 0.00 0.00 0 0 0 0
Fetch 10 0.00 0.00 0 30 0 10
total 28 0.00 0.00 0 30 0 10
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
1 TABLE ACCESS BY INDEX ROWID OBJ#(61) (cr=3 pr=0 pw=0 time=164 us)
1 INDEX UNIQUE SCAN OBJ#(100) (cr=2 pr=0 pw=0 time=97 us)(object id 100)
select /*+ index(idl_sb4$ i_idl_sb41) +*/ piece#,length,piece
from
idl_sb4$ where obj#=:1 and part=:2 and version=:3 order by piece#
call count cpu elapsed disk query current rows
Parse 30 0.00 0.00 0 0 0 0
Execute 30 0.01 0.00 0 0 0 0
Fetch 82 0.01 0.00 0 216 0 52
total 142 0.02 0.02 0 216 0 52
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
2 TABLE ACCESS BY INDEX ROWID IDL_SB4$ (cr=6 pr=0 pw=0 time=226 us)
2 INDEX RANGE SCAN I_IDL_SB41 (cr=4 pr=0 pw=0 time=181 us)(object id 116)
select /*+ index(idl_ub1$ i_idl_ub11) +*/ piece#,length,piece
from
idl_ub1$ where obj#=:1 and part=:2 and version=:3 order by piece#
call count cpu elapsed disk query current rows
Parse 30 0.01 0.00 0 0 0 0
Execute 30 0.02 0.00 0 0 0 0
Fetch 58 0.01 0.00 0 149 0 30
total 118 0.04 0.02 0 149 0 30
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
1 TABLE ACCESS BY INDEX ROWID IDL_UB1$ (cr=4 pr=0 pw=0 time=222 us)
1 INDEX RANGE SCAN I_IDL_UB11 (cr=3 pr=0 pw=0 time=164 us)(object id 113)
select /*+ index(idl_char$ i_idl_char1) +*/ piece#,length,piece
from
idl_char$ where obj#=:1 and part=:2 and version=:3 order by piece#
call count cpu elapsed disk query current rows
Parse 30 0.00 0.00 0 0 0 0
Execute 30 0.00 0.00 0 0 0 0
Fetch 55 0.01 0.00 0 135 0 25
total 115 0.01 0.01 0 135 0 25
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
1 TABLE ACCESS BY INDEX ROWID IDL_CHAR$ (cr=4 pr=0 pw=0 time=233 us)
1 INDEX RANGE SCAN I_IDL_CHAR1 (cr=3 pr=0 pw=0 time=168 us)(object id 114)
select /*+ index(idl_ub2$ i_idl_ub21) +*/ piece#,length,piece
from
idl_ub2$ where obj#=:1 and part=:2 and version=:3 order by piece#
call count cpu elapsed disk query current rows
Parse 30 0.02 0.00 0 0 0 0
Execute 30 0.02 0.00 0 0 0 0
Fetch 56 0.00 0.00 0 190 0 51
total 116 0.04 0.02 0 190 0 51
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
0 TABLE ACCESS BY INDEX ROWID IDL_UB2$ (cr=0 pr=0 pw=0 time=0 us)
0 INDEX RANGE SCAN I_IDL_UB21 (cr=0 pr=0 pw=0 time=0 us)(object id 115)
select audit$,properties
from
type_misc$ where obj#=:1
call count cpu elapsed disk query current rows
Parse 16 0.01 0.01 0 0 0 0
Execute 16 0.01 0.00 0 0 0 0
Fetch 16 0.00 0.00 0 48 0 16
total 48 0.02 0.03 0 48 0 16
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
0 TABLE ACCESS CLUSTER TYPE_MISC$ (cr=0 pr=0 pw=0 time=0 us)
0 INDEX UNIQUE SCAN I_OBJ# (cr=0 pr=0 pw=0 time=0 us)(object id 3)
select source
from
source$ where obj#=:1 order by line
call count cpu elapsed disk query current rows
Parse 4 0.01 0.00 0 0 0 0
Execute 4 0.02 0.01 0 0 0 0
Fetch 4 0.00 0.00 0 16 0 30
total 12 0.03 0.02 0 16 0 30
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
2 TABLE ACCESS BY INDEX ROWID SOURCE$ (cr=4 pr=0 pw=0 time=244 us)
2 INDEX RANGE SCAN I_SOURCE1 (cr=3 pr=0 pw=0 time=161 us)(object id 112)
select obj#
from
oid$ where user#=:1 and oid$=:2
call count cpu elapsed disk query current rows
Parse 2 0.01 0.01 0 0 0 0
Execute 6 0.02 0.02 0 0 0 0
Fetch 6 0.00 0.00 0 18 0 6
total 14 0.03 0.03 0 18 0 6
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
1 TABLE ACCESS BY INDEX ROWID OBJ#(291) (cr=3 pr=0 pw=0 time=165 us)
1 INDEX UNIQUE SCAN OBJ#(292) (cr=2 pr=0 pw=0 time=105 us)(object id 292)
select con#,obj#,rcon#,enabled,nvl(defer,0)
from
cdef$ where robj#=:1
call count cpu elapsed disk query current rows
Parse 6 0.00 0.00 0 0 0 0
Execute 10 0.00 0.00 0 0 0 0
Fetch 11 0.01 0.00 0 12 0 1
total 27 0.01 0.00 0 12 0 1
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
select con#,type#,condlength,intcols,robj#,rcon#,match#,refact,nvl(enabled,0),
rowid,cols,nvl(defer,0),mtime,nvl(spare1,0)
from
cdef$ where obj#=:1
call count cpu elapsed disk query current rows
Parse 6 0.00 0.00 0 0 0 0
Execute 10 0.00 0.00 0 0 0 0
Fetch 35 0.00 0.00 0 51 0 25
total 51 0.00 0.00 0 51 0 25
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
select intcol#,nvl(pos#,0),col#,nvl(spare1,0)
from
ccol$ where con#=:1
call count cpu elapsed disk query current rows
Parse 4 0.00 0.00 0 0 0 0
Execute 25 0.00 0.00 0 0 0 0
Fetch 52 0.01 0.00 0 104 0 27
total 81 0.01 0.00 0 104 0 27
Misses in library cache during parse: 0
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
select u.name, o.name, a.interface_version#
from
association$ a, user$ u, obj$ o where a.obj# = :1
and a.property = :2
and a.statstype# = o.obj# and
u.user# = o.owner#
call count cpu elapsed disk query current rows
Parse 6 0.02 0.01 0 0 0 0
Execute 6 0.02 0.01 0 0 0 0
Fetch 6 0.00 0.00 0 38 0 4
total 18 0.04 0.02 0 38 0 4
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
0 NESTED LOOPS (cr=3 pr=0 pw=0 time=300 us)
0 NESTED LOOPS (cr=3 pr=0 pw=0 time=288 us)
0 TABLE ACCESS FULL ASSOCIATION$ (cr=3 pr=0 pw=0 time=280 us)
0 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=0 pr=0 pw=0 time=0 us)
0 INDEX UNIQUE SCAN I_OBJ1 (cr=0 pr=0 pw=0 time=0 us)(object id 36)
0 TABLE ACCESS CLUSTER USER$ (cr=0 pr=0 pw=0 time=0 us)
0 INDEX UNIQUE SCAN I_USER# (cr=0 pr=0 pw=0 time=0 us)(object id 11)
select count(*)
FROM
pt_source a, trj_tmp_buf b, TABLE (SDO_JOIN('PT_SOURCE', 'SHAPE',
'TRJ_TMP_BUF', 'SHAPE', 'mask=ANYINTERACT')) c, pollution_source d WHERE
c.rowid1 = a.rowid AND c.rowid2 = b.rowid and d.id=a.id
call count cpu elapsed disk query current rows
Parse 1 0.25 0.21 0 165 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.25 0.21 0 165 0 0
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 58 (APPDEV)
Rows Execution Plan
0 SELECT STATEMENT MODE: ALL_ROWS
0 SORT (AGGREGATE)
0 HASH JOIN
0 INDEX MODE: ANALYZED (FAST FULL SCAN) OF 'SYS_C005072'
(INDEX (UNIQUE))
0 NESTED LOOPS
0 HASH JOIN
0 INDEX MODE: ANALYZED (FULL SCAN) OF 'SYS_C005098'
(INDEX (UNIQUE))
0 COLLECTION ITERATOR (PICKLER FETCH) OF 'SDO_JOIN'
0 TABLE ACCESS MODE: ANALYZED (BY USER ROWID) OF
'PT_SOURCE' (TABLE)
SELECT USER
FROM
DUAL
call count cpu elapsed disk query current rows
Parse 2 0.01 0.00 0 0 0 0
Execute 2 0.00 0.00 0 0 0 0
Fetch 2 0.00 0.00 0 0 0 2
total 6 0.01 0.00 0 0 0 2
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 58 (APPDEV) (recursive depth: 1)
Rows Execution Plan
0 SELECT STATEMENT MODE: ALL_ROWS
0 FAST DUAL
SELECT INSTR(:B1 , '.')
FROM
DUAL
call count cpu elapsed disk query current rows
Parse 2 0.02 0.01 0 0 0 0
Execute 2 0.00 0.00 0 0 0 0
Fetch 2 0.00 0.00 0 0 0 2
total 6 0.02 0.01 0 0 0 2
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 58 (APPDEV) (recursive depth: 1)
Rows Execution Plan
0 SELECT STATEMENT MODE: ALL_ROWS
0 FAST DUAL
select cols,audit$,textlength,intcols,property,flags,rowid
from
view$ where obj#=:1
call count cpu elapsed disk query current rows
Parse 7 0.00 0.00 0 0 0 0
Execute 7 0.00 0.00 0 0 0 0
Fetch 7 0.00 0.00 0 21 0 7
total 21 0.00 0.01 0 21 0 7
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 2)
Rows Row Source Operation
1 TABLE ACCESS BY INDEX ROWID OBJ#(62) (cr=3 pr=0 pw=0 time=168 us)
1 INDEX UNIQUE SCAN OBJ#(98) (cr=2 pr=0 pw=0 time=106 us)(object id 98)
select text
from
view$ where rowid=:1
call count cpu elapsed disk query current rows
Parse 12 0.04 0.01 0 0 0 0
Execute 12 0.01 0.00 0 0 0 0
Fetch 12 0.00 0.00 0 24 0 12
total 36 0.05 0.02 0 24 0 12
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 2)
Rows Row Source Operation
0 TABLE ACCESS BY USER ROWID VIEW$ (cr=0 pr=0 pw=0 time=0 us)
SELECT index_owner, index_name
from
all_ind_columns WHERE table_name = 'PT_SOURCE' and column_name = 'SHAPE'
and table_owner = 'APPDEV'
call count cpu elapsed disk query current rows
Parse 1 0.17 0.17 0 3 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.00 0.00 0 43 0 1
total 3 0.17 0.17 0 46 0 1
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 58 (APPDEV) (recursive depth: 1)
error during execute of EXPLAIN PLAN statement
ORA-01039: insufficient privileges on underlying objects of the view
parse error offset: 100
SELECT index_owner, index_name
from
all_ind_columns WHERE table_name = 'TRJ_TMP_BUF' and column_name = 'SHAPE'
and table_owner = 'APPDEV'
call count cpu elapsed disk query current rows
Parse 1 0.15 0.14 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.00 0.00 0 38 0 1
total 3 0.15 0.14 0 38 0 1
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 58 (APPDEV) (recursive depth: 1)
error during execute of EXPLAIN PLAN statement
ORA-01039: insufficient privileges on underlying objects of the view
parse error offset: 100
SELECT sdo_rtree_height
from
all_sdo_index_metadata WHERE sdo_index_name = 'PT_SPATIAL_IDX' and
sdo_index_owner = 'APPDEV'
call count cpu elapsed disk query current rows
Parse 1 0.22 0.19 0 51 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.00 0.00 0 24 0 1
total 3 0.22 0.19 0 75 0 1
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 58 (APPDEV) (recursive depth: 1)
error during execute of EXPLAIN PLAN statement
ORA-01039: insufficient privileges on underlying objects of the view
parse error offset: 93
SELECT sdo_rtree_height
from
all_sdo_index_metadata WHERE sdo_index_name = 'TRJ_TMP_BUF_SPT_IDX' and
sdo_index_owner = 'APPDEV'
call count cpu elapsed disk query current rows
Parse 1 0.09 0.08 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.00 0.00 0 24 0 1
total 3 0.09 0.08 0 24 0 1
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 58 (APPDEV) (recursive depth: 1)
error during execute of EXPLAIN PLAN statement
ORA-01039: insufficient privileges on underlying objects of the view
parse error offset: 93
select numbind, nextbindnum, property
from
operator$ where obj#=:1
call count cpu elapsed disk query current rows
Parse 2 0.01 0.00 0 0 0 0
Execute 2 0.02 0.01 0 0 0 0
Fetch 2 0.00 0.00 0 4 0 2
total 6 0.03 0.02 0 4 0 2
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 2)
Rows Row Source Operation
1 TABLE ACCESS BY INDEX ROWID OPERATOR$ (cr=2 pr=0 pw=0 time=138 us)
1 INDEX UNIQUE SCAN OPER1 (cr=1 pr=0 pw=0 time=81 us)(object id 369)
select bind#, functionname, property, returnschema, returntype, impschema,
imptype
from
opbinding$ where obj# = :1
call count cpu elapsed disk query current rows
Parse 2 0.01 0.01 0 21 0 0
Execute 2 0.03 0.01 0 0 0 0
Fetch 4 0.00 0.00 0 6 0 2
total 8 0.04 0.02 0 27 0 2
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 2)
Rows Row Source Operation
1 TABLE ACCESS BY INDEX ROWID OPBINDING$ (cr=3 pr=0 pw=0 time=198 us)
1 INDEX RANGE SCAN OPBIND1 (cr=2 pr=0 pw=0 time=196 us)(object id 371)
select position, type
from
oparg$ where obj#=:1 and bind#=:2 order by position
call count cpu elapsed disk query current rows
Parse 2 0.01 0.01 0 0 0 0
Execute 2 0.02 0.01 0 0 0 0
Fetch 8 0.00 0.00 0 4 0 6
total 12 0.03 0.03 0 4 0 6
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 2)
Rows Row Source Operation
3 SORT ORDER BY (cr=2 pr=0 pw=0 time=343 us)
3 TABLE ACCESS BY INDEX ROWID OPARG$ (cr=2 pr=0 pw=0 time=215 us)
3 INDEX RANGE SCAN OPARG1 (cr=1 pr=0 pw=0 time=127 us)(object id 375)
select obj#,implobj#,property, interface_version#
from
indtypes$ where obj#=:1
call count cpu elapsed disk query current rows
Parse 1 0.01 0.00 0 0 0 0
Execute 1 0.01 0.00 0 0 0 0
Fetch 1 0.00 0.00 0 3 0 1
total 3 0.02 0.01 0 3 0 1
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 2)
Rows Row Source Operation
1 TABLE ACCESS FULL OBJ#(376) (cr=3 pr=0 pw=0 time=242 us)
select obj#,oper#,bind#,property,filt_nam,filt_sch, filt_typ
from
indop$ where obj#=:1
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 0
Fetch 49 0.00 0.00 0 51 0 48
total 51 0.00 0.01 0 51 0 48
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 2)
Rows Row Source Operation
48 TABLE ACCESS FULL OBJ#(377) (cr=51 pr=0 pw=0 time=239 us)
declare
rstr varchar2(4000);
begin
:1 := "MDSYS"."SDO_INDEX_METHOD_10I".ODCIINDEXREWRITE(SYS.ODCIINDEXINFO('APPDEV', 'TRJ_TMP_BUF_SPT_IDX',
SYS.ODCICOLINFOLIST(SYS.ODCICOLINFO('APPDEV', 'TRJ_TMP_BUF', '"SHAPE"', 'SDO_GEOMETRY', 'MDSYS', NULL)),
NULL, 0, 0),
SYS.ODCIINDEXINFO('APPDEV', 'PT_SPATIAL_IDX',
SYS.ODCICOLINFOLIST(SYS.ODCICOLINFO('APPDEV', 'PT_SOURCE', '"SHAPE"', 'SDO_GEOMETRY', 'MDSYS', NULL)),
NULL, 0, 0),
'B', 'A', SYS.ODCIPREDINFO('MDSYS', 'SDO_RELATE', NULL, 13), SYS.ODCIQUERYINFO(2, NULL),
'TRUE', 'TRUE', 'querytype=window mask=ANYINTERACT', rstr, SYS.ODCIENV(0, 0, 0, 24));
:2 := rstr;
end;
call count cpu elapsed disk query current rows
Parse 1 0.01 0.00 0 0 0 0
Execute 1 0.14 0.18 0 360 0 1
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.15 0.19 0 360 0 1
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 36 (MDSYS) (recursive depth: 2)
select audit$
from
library$ where obj#=:1
call count cpu elapsed disk query current rows
Parse 1 0.01 0.00 0 0 0 0
Execute 1 0.02 0.01 0 0 0 0
Fetch 1 0.00 0.00 0 3 0 1
total 3 0.03 0.02 0 3 0 1
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 3)
Rows Row Source Operation
1 TABLE ACCESS CLUSTER LIBRARY$ (cr=3 pr=0 pw=0 time=202 us)
1 INDEX UNIQUE SCAN I_OBJ# (cr=2 pr=0 pw=0 time=73 us)(object id 3)
SELECT sdo_diminfo, nvl(sdo_srid,-1)
FROM
SDO_GEOM_METADATA_TABLE WHERE SDO_OWNER = 'APPDEV' AND SDO_TABLE_NAME =
UPPER('TRJ_TMP_BUF') AND '"'||SDO_COLUMN_NAME||'"' = '"SHAPE"'
call count cpu elapsed disk query current rows
Parse 1 0.04 0.05 0 6 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.00 0.00 0 2 0 1
total 3 0.04 0.05 0 8 0 1
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 36 (MDSYS) (recursive depth: 3)
Rows Row Source Operation
0 TABLE ACCESS BY INDEX ROWID SDO_GEOM_METADATA_TABLE (cr=0 pr=0 pw=0 time=0 us)
0 INDEX RANGE SCAN SDO_GEOM_IDX (cr=0 pr=0 pw=0 time=0 us)(object id 41168)
error during execute of EXPLAIN PLAN statement
ORA-00942: table or view does not exist
parse error offset: 107
SELECT sdo_diminfo, nvl(sdo_srid,-1)
FROM
SDO_GEOM_METADATA_TABLE WHERE SDO_OWNER = 'APPDEV' AND SDO_TABLE_NAME =
UPPER('PT_SOURCE') AND '"'||SDO_COLUMN_NAME||'"' = '"SHAPE"'
call count cpu elapsed disk query current rows
Parse 1 0.03 0.03 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.00 0.00 0 2 0 1
total 3 0.03 0.03 0 2 0 1
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 36 (MDSYS) (recursive depth: 3)
Rows Row Source Operation
0 TABLE ACCESS BY INDEX ROWID SDO_GEOM_METADATA_TABLE (cr=0 pr=0 pw=0 time=0 us)
0 INDEX RANGE SCAN SDO_GEOM_IDX (cr=0 pr=0 pw=0 time=0 us)(object id 41168)
error during execute of EXPLAIN PLAN statement
ORA-00942: table or view does not exist
parse error offset: 107
SELECT nvl(sdo_level,0), nvl(sdo_numtiles,0), nvl(sdo_maxlevel, 0),
sdo_index_table, sdo_index_primary, sdo_index_type, nvl(sdo_rtree_height, 0)
, nvl(sdo_rtree_num_nodes, 0), nvl(sdo_rtree_dimensionality, 0),
nvl(sdo_rtree_fanout, 0), nvl(sdo_rtree_root, 'EMPTY'),
nvl(sdo_rtree_seq_name, 'DEFAULT'), sdo_index_partition,
nvl(sdo_partitioned, 0), nvl(sdo_layer_gtype, 'DEFAULT'),
nvl(sdo_index_dims, 0), nvl(sdo_rtree_pctfree, 10), nvl(sdo_rtree_quality,
0), nvl(sdo_index_version, 0), nvl(sdo_tablespace, 'DEFAULT'),
nvl(sdo_index_geodetic, 'FALSE'), sdo_index_status
FROM
sdo_index_metadata_table WHERE sdo_index_owner = 'APPDEV' and sdo_index_name
= 'TRJ_TMP_BUF_SPT_IDX' ORDER BY SDO_INDEX_PRIMARY
call count cpu elapsed disk query current rows
Parse 1 0.04 0.03 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 2 0.00 0.00 0 2 0 1
total 4 0.04 0.03 0 2 0 1
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 36 (MDSYS) (recursive depth: 3)
Rows Row Source Operation
1 SORT ORDER BY (cr=2 pr=0 pw=0 time=366 us)
1 TABLE ACCESS BY INDEX ROWID SDO_INDEX_METADATA_TABLE (cr=2 pr=0 pw=0 time=216 us)
1 INDEX RANGE SCAN SDO_IDX_MDATA_IDX (cr=1 pr=0 pw=0 time=136 us)(object id 49332)
error during execute of EXPLAIN PLAN statement
ORA-00942: table or view does not exist
parse error offset: 639
SELECT nvl(sdo_level,0), nvl(sdo_numtiles,0), nvl(sdo_maxlevel, 0),
sdo_index_table, sdo_index_primary, sdo_index_type, nvl(sdo_rtree_height, 0)
, nvl(sdo_rtree_num_nodes, 0), nvl(sdo_rtree_dimensionality, 0),
nvl(sdo_rtree_fanout, 0), nvl(sdo_rtree_root, 'EMPTY'),
nvl(sdo_rtree_seq_name, 'DEFAULT'), sdo_index_partition,
nvl(sdo_partitioned, 0), nvl(sdo_layer_gtype, 'DEFAULT'),
nvl(sdo_index_dims, 0), nvl(sdo_rtree_pctfree, 10), nvl(sdo_rtree_quality,
0), nvl(sdo_index_version, 0), nvl(sdo_tablespace, 'DEFAULT'),
nvl(sdo_index_geodetic, 'FALSE'), sdo_index_status
FROM
sdo_index_metadata_table WHERE sdo_index_owner = 'APPDEV' and sdo_index_name
= 'PT_SPATIAL_IDX' ORDER BY SDO_INDEX_PRIMARY
call count cpu elapsed disk query current rows
Parse 1 0.03 0.02 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 2 0.00 0.00 0 2 0 1
total 4 0.03 0.02 0 2 0 1
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 36 (MDSYS) (recursive depth: 3)
Rows Row Source Operation
1 SORT ORDER BY (cr=2 pr=0 pw=0 time=388 us)
1 TABLE ACCESS BY INDEX ROWID SDO_INDEX_METADATA_TABLE (cr=2 pr=0 pw=0 time=236 us)
1 INDEX RANGE SCAN SDO_IDX_MDATA_IDX (cr=1 pr=0 pw=0 time=138 us)(object id 49332)
error during execute of EXPLAIN PLAN statement
ORA-00942: table or view does not exist
parse error offset: 639
declare
cost sys.ODCICost := sys.ODCICost(NULL, NULL, NULL, NULL);
obj0 "MDSYS"."SDO_GEOMETRY" := "MDSYS"."SDO_GEOMETRY"(NULL, NULL, NULL, NULL, NULL);
obj1 "MDSYS"."SDO_GEOMETRY" := "MDSYS"."SDO_GEOMETRY"(NULL, NULL, NULL, NULL, NULL);
begin
:1 := "MDSYS"."SDO_STATISTICS".ODCIStatsFunctionCost(
sys.ODCIFuncInfo('MDSYS',
'SDO_3GL',
'RELATE',
2),
cost,
sys.ODCIARGDESCLIST(sys.ODCIARGDESC(2, 'TRJ_TMP_BUF', 'APPDEV', '"SHAPE"', NULL, NULL, NULL), sys.ODCIARGDESC(2, 'PT_SOURCE', 'APPDEV', '"SHAPE"', NULL, NULL, NULL), sys.ODCIARGDESC(3, NULL, NULL, NULL, NULL, NULL, NULL))
, obj0, obj1, :5,
sys.ODCIENV(:6,:7,:8,:9));
if cost.CPUCost IS NULL then
:2 := -1;
else
:2 := cost.CPUCost;
end if;
if cost.IOCost IS NULL then
:3 := -1;
else
:3 := cost.IOCost;
end if;
if cost.NetworkCost IS NULL then
:4 := -1;
else
:4 := cost.NetworkCost;
end if;
exception
when others then
raise;
end;
call count cpu elapsed disk query current rows
Parse 2 0.01 0.00 0 0 0 0
Execute 2 0.09 0.10 0 228 0 2
Fetch 0 0.00 0.00 0 0 0 0
total 4 0.10 0.11 0 228 0 2
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 58 (APPDEV) (recursive depth: 2)
declare
sel number;
obj0 "MDSYS"."SDO_GEOMETRY" := "MDSYS"."SDO_GEOMETRY"(NULL, NULL, NULL, NULL, NULL);
obj1 "MDSYS"."SDO_GEOMETRY" := "MDSYS"."SDO_GEOMETRY"(NULL, NULL, NULL, NULL, NULL);
begin
:1 := "MDSYS"."SDO_STATISTICS".ODCIStatsSelectivity(
sys.ODCIPREDINFO('MDSYS',
'SDO_3GL',
'RELATE',
173),
sel,
sys.ODCIARGDESCLIST(sys.ODCIARGDESC(3, NULL, NULL, NULL, NULL, NULL, NULL), sys.ODCIARGDESC(3, NULL, NULL, NULL, NULL, NULL, NULL), sys.ODCIARGDESC(2, 'TRJ_TMP_BUF', 'APPDEV', '"SHAPE"', NULL, NULL, NULL), sys.ODCIARGDESC(2, 'PT_SOURCE', 'APPDEV', '"SHAPE"', NULL, NULL, NULL), sys.ODCIARGDESC(3, NULL, NULL, NULL, NULL, NULL, NULL)),
:3,
:4
, obj0, obj1, :5,
sys.ODCIENV(:6,:7,:8,:9));
if sel IS NULL then
:2 := -1;
else
:2 := sel;
end if;
exception
when others then
raise;
end;
call count cpu elapsed disk query current rows
Parse 1 0.01 0.01 0 0 0 0
Execute 1 0.06 0.05 0 180 0 1
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.07 0.06 0 180 0 1
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 58 (APPDEV) (recursive depth: 2)
select a.default_cpu_cost, a.default_io_cost
from
association$ a where a.obj# = :1
and a.property = :2
call count cpu elapsed disk query current rows
Parse 1 0.01 0.00 0 0 0 0
Execute 1 0.01 0.01 0 0 0 0
Fetch 1 0.00 0.00 0 3 0 0
total 3 0.02 0.02 0 3 0 0
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 2)
Rows Row Source Operation
0 TABLE ACCESS FULL ASSOCIATION$ (cr=3 pr=0 pw=0 time=208 us)
declare
cost sys.ODCICost := sys.ODCICost(NULL, NULL, NULL, NULL);
obj1 "MDSYS"."SDO_GEOMETRY" := "MDSYS"."SDO_GEOMETRY"(NULL, NULL, NULL, NULL, NULL);
obj2 "MDSYS"."SDO_GEOMETRY" := "MDSYS"."SDO_GEOMETRY"(NULL, NULL, NULL, NULL, NULL);
begin
:1 := "MDSYS"."SDO_STATISTICS".ODCIStatsIndexCost(
sys.ODCIINDEXINFO('APPDEV',
'TRJ_TMP_BUF_SPT_IDX',
sys.ODCICOLINFOLIST(sys.ODCICOLINFO('APPDEV', 'TRJ_TMP_BUF', '"SHAPE"', 'SDO_GEOMETRY', 'MDSYS', NULL)),
NULL,
0,
0),
1.00000000,
cost,
sys.ODCIQUERYINFO(2,
NULL),
sys.ODCIPREDINFO('MDSYS',
'SDO_RTREE_RELATE',
NULL,
141),
sys.ODCIARGDESCLIST(sys.ODCIARGDESC(3, NULL, NULL, NULL, NULL, NULL, NULL), sys.ODCIARGDESC(3, NULL, NULL, NULL, NULL, NULL, NULL), sys.ODCIARGDESC(2, 'TRJ_TMP_BUF', 'APPDEV', '"SHAPE"', NULL, NULL, NULL), sys.ODCIARGDESC(2, 'PT_SOURCE', 'APPDEV', '"SHAPE"', NULL, NULL, NULL), sys.ODCIARGDESC(3, NULL, NULL, NULL, NULL, NULL, NULL)),
:6,
:7
, obj2, :8,
sys.ODCIENV(:9,:10,:11,:12));
if cost.CPUCost IS NULL then
:2 := -1;
else
:2 := cost.CPUCost;
end if;
if cost.IOCost IS NULL then
:3 := -1;
else
:3 := cost.IOCost;
end if;
if cost.NetworkCost IS NULL then
:4 := -1;
else
:4 := cost.NetworkCost;
end if;
:5 := cost.IndexCostInfo;
exception
when others then
raise;
end;
call count cpu elapsed disk query current rows
Parse 1 0.01 0.01 0 0 0 0
Execute 0 0.00 0.00 0 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
total 1 0.01 0.01 0 0 0 0
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 58 (APPDEV) (recursive depth: 2)
SELECT /*+ MERGE USE_NL(b) */ a.rowid, b.rowid
from
PT_SOURCE a, TRJ_TMP_BUF b WHERE sdo_relate(b.SHAPE, a.SHAPE, 'querytype=
window mask=ANYINTERACT')= 'TRUE'
call count cpu elapsed disk query current rows
Parse 1 0.30 0.30 0 894 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.30 0.30 0 894 0 0
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 58 (APPDEV) (recursive depth: 1)
Rows Execution Plan
0 SELECT STATEMENT MODE: ALL_ROWS
0 NESTED LOOPS
0 TABLE ACCESS MODE: ANALYZED (FULL) OF 'TRJ_TMP_BUF' (TABLE)
0 TABLE ACCESS MODE: ANALYZED (FULL) OF 'PT_SOURCE' (TABLE)
SELECT DIMINFO
FROM
ALL_SDO_GEOM_METADATA WHERE OWNER = 'APPDEV' AND TABLE_NAME = 'TRJ_TMP_BUF'
AND COLUMN_NAME = 'SHAPE'
call count cpu elapsed disk query current rows
Parse 1 0.50 0.51 0 9 0 0
Execute 1960 1.79 1.62 0 0 0 0
Fetch 1960 8.38 8.13 0 43120 0 1960
total 3921 10.67 10.27 0 43129 0 1960
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 58 (APPDEV) (recursive depth: 2)
error during execute of EXPLAIN PLAN statement
ORA-01039: insufficient privileges on underlying objects of the view
parse error offset: 84
SELECT signature, nhash, sqlarea_hash, last_used, inuse_features, flags,
modified, incarnation
FROM
sql$ WHERE signature = :1
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.01 0.02 0 0 0 0
Fetch 1 0.00 0.00 0 2 0 1
total 3 0.01 0.02 0 2 0 1
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 3)
Rows Row Source Operation
1 TABLE ACCESS BY INDEX ROWID SQL$ (cr=2 pr=0 pw=0 time=162 us)
1 INDEX UNIQUE SCAN I_SQL$SIGNATURE (cr=1 pr=0 pw=0 time=104 us)(object id 453)
SELECT category
FROM
sqlprof$ WHERE signature = :1
call count cpu e

Similar Messages

  • Spatial join view

    Good afternoon,
    I am new on oracle spatial and I have to do a simple spatial join view. So from two table name and a operation I have to create a view that makes a join of type "operation" between two table.
    For example, in a high level language:
    create or replace view VIEW_NAME as select * from table1,table2 where operation(table1.geom,table2.geom).
    Where "operation" could be intersect, touch, overlaps,contains, disjoint...and so on...
    I can't find a complete example for my problem.
    Thanks for all your help, it is very important.
    Best regards
    Anna Zanetti

    ok..thank you very much.
    But If I want to make one of the following operation (BBOX,Beyond,Contains,Crosses,Disjoint,
    Equals,Intersects,Overlaps,Touches,Within), what kind of mask have I to use?
    I understand that this are the possibile mask:
    TOUCH, OVERLAPBDYDISJOINT, OVERLAPBDYINTERSECT, EQUAL, INSIDE, COVEREDBY, CONTAINS, COVERS, ANYINTERACT, ON
    I think that there is not a perfect matching, in fact I think that ANYINTERACT is different from intersects!!!
    I am wrong?
    Is there any table of matching between operations???
    Thank a lot
    Best regards
    Anna Zanetti

  • Spatial Join

    Hi,
    I am new to Oracle Spatial.
    I am having two different version of TeleAtlas road network data. I am not seeing any common id between these two map data. I would like to copy two columns from old data to the new data based on geometry.
    any help on this.

    If you are trying to add two new columns from the old table to the new table, you might have to do some kind of join on these two tables.
    One way to do this is to come up with a mapping table from new IDs to old IDs.
    This can be done by joining the geometry with sdo_equal operator (11.2 19 Spatial Operator in http://download.oracle.com/docs/cd/E11882_01/appdev.112/e11830/sdo_operat.htm) or if you have other unique keys (like name, most likely will be more efficient than spatial join).
    Once the mapping table is created, you can update the new table with two columns from the old table with your old table and the mapping table:
    Since you have a fairly large table (~30M rows) with indexes, a better/efficient approach is to create a new table instead of updating the current new table.
    Then rename it and create necessary indexes on it.
    jack

  • Spatial Join on Topology feature layers

    I would like to be able to do a "spatial join" on topolgy feature layers. With sdo_geometry layers a spatial join finds ALL specified spatial interactions between complete layers. I would like to know if this is possible using topology feature layers, or if this functionality may be coming in the future along with (hopefully) sdo_topo_nn, sdo_topo_nn_distance, and sdo_topo_within_distance....?
    Alden

    Hi,
    updating millions of records could lock your resource and other users may have trouble connecting or reading data.
    In some cases, variable table is your friend, insert the data you needed to a variable table before issuing the update.
    with that, you may need to have (nolock) on each table. eg. 
    [LegislativeMapData2014].[dbo].[CONGRESS_2014] (nolock)
    Regards,
    gioVhan
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Is it possible to change an existing join in Plus?

    In Discoverer Plus, is there a way to change a join in an existing report? Currently I only have access to Desktop (10.1.2.2), but if it can be done in Plus that might be something worth pursuing.
    My situation is, I have a fairly complex worksheet where I need to change an existing join to an outer join. I can't change the join itself, in Admin - that would affect other reports that use it. I know in Desktop, if I remove all the items from the joined table (including calcs and conditions that reference it), then add them back in, it will prompt me for which join to use. However, in this case, by the time I remove and re-add all those items, I've practically had to rewrite the report.
    I'm pretty sure that's what I'll have to do but I'm hoping someone will be aware of a workaround that I'm missing. If getting access to Plus will make things easier, it would be worth it.
    Thanks!

    Hi
    I'm afraid you will fare no better in Plus either as the same thing will happen there. You will have to remove all of the items that use the existing join then as soon as you start to add them back in you will be asked to pick a join.
    There are lots of good reasons to use Plus, this isn't one of them as the functionality, or lack of depending upon your point of view, is the same.
    Best wishes
    Michael

  • Mystery audio performance changes and distortion

    I listen to a lot of rock, hard rock, and heavy metal on my 80GB Video iPod. In the past two months, I’ve been having problems with distortion and equalization. I do have the latest iTunes and iPod software updates installed and I have re-instaled iTunes and re-initialized the iPod.
    Originally, I was using the iPod earbuds and upgraded to vModa Vibes. Most of my music sounded great with an EQ setting of “Dance” with the vModas.
    After a while, I started to experience distortion and loss of detail, especially on the left side (crackling). I thought I had damaged the vModa Vibes, so I purchased a pair of Ultimate Ears Super.fi 5 Pro Earphones.
    The Ultimate Ears Super.fi 5 Pro earphones sounded terrible with no highs or midrange detail and way too much low range. They seemed to distort easily and overload in the-mid range if there was a lot guitars playing (drowning the details out). I tried all sorts of EQ settings to no avail. The problems remained, even on treble boost, but I didn't have a problem specific to the left side.
    I returned the Ultimate Ears Super.fi 5 Pro earphones and switched back to the vModa Vibes for a while and finally decided, on the recommendation of a friend, to try the Bose TriPort IE earphones.
    The Bose TriPort IE earphones were much better than the Ultimate Ears Super.fi 5 Pro earphones, but still lacked high frequency and mid-range detail as compared to the vModa Vibes.
    While switching back and forth between the vModas and the Bose earphones, the sound performance (or equalization) seemed to change at random, even though I kept the EQ set to off.
    At one point, the vModas suddenly had incredible bass, while maintaining the other performance characteristics, with the EQ still set to off. Later, I played the same song again, and the bass was normal (all I did was charge the battery with the Apple USB AC adapter).
    I’ve been using the vModas again for about a week now, and every time I listen to the same song, it plays differently, sometimes great, sometimes with extra bass, sometimes muddled and distorted. The same thing happens with Bose TriPort IEs, except they aren’t as clear as the vModas.
    The performance issues seem to somewhat track battery charging (i.e. – after I charge the iPod up, audio performance changes and it sometimes improves as the battery drains).
    I figure that either there is a hardware problem with the iPod or there is some type of EQ virus going around.
    Anyone having similar problems or have a solution??

    I went out and bought a 2 GB iPod Nano and loaded some songs onto it.
    Everything sounds great with the vModa Vibe earphones so I guess my 80 GB video iPod might have a few twisted transistors.
    I'll have to try to clear out the 80 GB video iPod and reinitialize/restore it again to see if it corrects the problem.

  • Should iOS Significant Location Change wake up my app after restarting a *locked* phone?

    I am building an app that uses the significant change API. Everything works fine except in a very specific case:
    If the user's phone is locked, and the user restarts the phone, then the Significant Location Change API will wake up the phone in the first few minutes and make a call to
    - (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
    All good, but at this point, if the user has yet to unlock their phone, the Significant Location Change will make no further attempts to wake up the app, even if I subsequently unlock the phone. Essentially, Significant Location Change monitoring gets turned off.
    N.B. that if I unlock (and re-lock) the phone before the SLC wakes up my app, then it will continue to wake up my app with any subsequent location changes.
    My question is: is this really the expected behaviour? Can anyone point me to documentation about the behaviour of the SLC API when the phone is locked, and specifically when the phone is locked and the device is restarted?

    Please let the OD Master and OD Replica replicate. You can reset the password manually on the wiki server. It may be a replica, but that doesn't mean you cant change things in the meanwhile.

  • Will I notice a significant performance drop if I run my Imac 8,1(early 2008) direct from an external firewire 800 Harddrive

    Will I notice a significant performance drop if I run my Imac 8,1(early 2008) direct from an external firewire 800 Harddrive

    I notice quite a difference in two of my externals because of that (the 5400 rpm drive was a warranty replacement and I had no idea it wouldn't be 7200 rpm - but that's another subject.....).

  • Poor performance with Oracle Spatial when spatial query invoked remotely

    Is anyone aware of any problems with Oracle Spatial (10.2.0.4 with patches 6989483 and 7003151 on Red Hat Linux 4) which might explain why a spatial query (SDO_WITHIN_DISTANCE) would perform 20 times worse when it was invoked remotely from another computer (using SQLplus) vs. invoking the very same query from the database server itself (also using SQLplus)?
    Does Oracle Spatial have any known problems with servers which use SAN disk storage? That is the primary difference between a server in which I see this poor performance and another server where the performance is fine.
    Thank you in advance for any thoughts you might share.

    OK, that's clearer.
    Are you sure it is the SQL inside the procedure that is causing the problem? To check, try extracting the SQL from inside the procedure and run it in SQLPLUS with
    set autotrace on
    set timing on
    SELECT ....If the plans and performance are the same then it may be something inside the procedure itself.
    Have you profiled the procedure? Here is an example of how to do it:
    Prompt Firstly, create PL/SQL profiler table
    @$ORACLE_HOME/rdbms/admin/proftab.sql
    Prompt Secondly, use the profiler to gather stats on execution characteristics
    DECLARE
      l_run_num PLS_INTEGER := 1;
      l_max_num PLS_INTEGER := 1;
      v_geom    mdsys.sdo_geometry := mdsys.sdo_geometry(2002,null,null,sdo_elem_info_array(1,2,1),sdo_ordinate_array(0,0,45,45,90,0,135,45,180,0,180,-45,45,-45,0,0));
    BEGIN
      dbms_output.put_line('Start Profiler Result = ' || DBMS_PROFILER.START_PROFILER(run_comment => 'PARALLEL PROFILE'));  -- The comment name can be anything: here it is related to the Parallel procedure I am testing.
      v_geom := Parallel(v_geom,10,0.05,1);  -- Put your procedure call here
      dbms_output.put_line('Stop Profiler Result = ' || DBMS_PROFILER.STOP_PROFILER );
    END;
    SHOW ERRORS
    Prompt Finally, report activity
    COLUMN runid FORMAT 99999
    COLUMN run_comment FORMAT A40
    SELECT runid || ',' || run_date || ',' || run_comment || ',' || run_total_time
      FROM plsql_profiler_runs
      ORDER BY runid;
    COLUMN runid       FORMAT 99999
    COLUMN unit_number FORMAT 99999
    COLUMN unit_type   FORMAT A20
    COLUMN unit_owner  FORMAT A20
    COLUMN text        FORMAT A100
    compute sum label 'Total_Time' of total_time on runid
    break on runid skip 1
    set linesize 200
    SELECT u.runid || ',' ||
           u.unit_name,
           d.line#,
           d.total_occur,
           d.total_time,
           text
    FROM   plsql_profiler_units u
           JOIN plsql_profiler_data d ON u.runid = d.runid
                                         AND
                                         u.unit_number = d.unit_number
           JOIN all_source als ON ( als.owner = 'CODESYS'
                                   AND als.type = u.unit_type
                                   AND als.name = u.unit_name
                                AND als.line = d.line# )
    WHERE  u.runid = (SELECT max(runid) FROM plsql_profiler_runs)
    ORDER BY d.total_time desc;Run the profiler in both environments and see if you can see where the slowdown exists.
    regards
    Simon

  • Performance Issue with Multiple Joins :-)

    Hi there! I have a dilemma over using multiple joins...and I am not sure whether there is any alternative to this. Please help me out if you can..
    I have a table DATA having 100 columns and 2 million records and I have another metadata table Code_Mappings. The issue is with migration of this data from upstreams to downstreams.
    Columns of DATA table is
    a,b,c,d,e,f,g,h.......ca.cb.cc.cd.....dz.
    Code_Mappings table is
    Source_code |Target code | category
    The problem arises when I join the metadata table for multiple joins..
    Around 75 columns out of 100 are category questions i.e I need to replace all Source codes in the data of those category columns with target codes WRT categories..
    Suppose A, C,D,I,J,K,L,W,X,Z,AA,BH are country category.
    My query to fetch data from DATA for column A would be
    Select decode(d.A, cm.source_code,cm.target_code,d.A) from DATA D,Code_Mappings CM where cm.category like 'country' and d.A=cm.source_code;
    In the similar way, I may have to join the same table for category 'country' for n no of columns if those columns have category as 'country'.
    Is there a alternative to use this table once and use the decode, mapping logic multiple times on columns..? Please let me know if there is anyways I can do it so that performance is enhanced in a significant manner.
    Another Issue is:
    Whenever the Column value is some junk, that record doesnt get fetched. In the above query, you can see that where clause has a condition of "d.A=cm.source_code" which not only filters out these required records but also avoids cartesian product.
    The basic requirement is all records should get fetched. I do not want to filter out anything.
    Please help me out.
    Thanks
    Mahesh

    1) I'm not a JD Edwards person, but I would wager that if you're to the point where you have consolidated all the schemas to a single instance that it would be possible and preferrable to consolidate everything further into a single schema. I have to believe that JD Edwards provides tools to restrict what bits a particular branch can see without requiring separate instances.
    2) What data are you accessing exactly? Are you always accessing data for a particular branch? Or do you need information from every branch?
    3) Is your application logging in as a single user? Or will there be 1 application user for every JD Edwards schema?
    4) Are you deploying your PL/SQL into 10-20 different schemas? Or into just 1?
    Whether or not you are explicitly using the schema name, Oracle will have to do a hard parse of every logically distinct SQL statement. Two SQL statements that access different tables that happen to share the same name are logically distinct, so your shared pool will end up with 10-20 copies of the "SELECT * FROM <<some table name>>" SQL statement if it is executed against every instance of <<some table name>>.
    The question may be whether it is better to explicitly provide the schema name or to rely on synonyms. You generate the same number of hard parses either way, but explicit schema names may improve latch contention during parses if Oracle has to do a lot of synonym resolution. Not many people/ applications are really hurt by this latch contention, though, so it is very hard to say whether this is a legitimate concern.
    Justin

  • How to change operator of join conditions in where clause?

    Hello
    I have a situation... I want to change the operator between each join conditions in the where clause when these join conditions are not from the same join..
    For example, I have the following schema:
    Dim1 ------ DimA -------Fact1
    Dim1-------DimB -----Fact1
    So DimA and DimB are aliasas of one dim table, but the join is different.
    Now if I run this model, what I will get in the where clause of the query is:
    Where Dim1 = DimA and Dim1 = DimB and DimA= Fact1 and DimB = fact1.
    Is there a way I can change these "and" operator to "OR", so that the where clause would look like this: Where Dim1 = DimA and Dim1 = DimB and DimA= Fact1 OR DimB = fact1?
    This is different from simply changing the join operator within the same join, because these are different joins and I'd like to control how they relate to each other..
    Please help
    Thanks

    Sometimes, business rules are complex, so there isn't always a way to simplify things.  Is your issue that it's complex and error prone, or is it performance due to the OR clauses?
    One possibility that will at least make it easier to test and debug is something like this:  (pseudocode)
    From Table1 Inner join Table2 on x=y etc.etc.
    CROSS APPLY
    (Select case when a=b and (c=d or e=f) then 1 else 0 end) as Situation1
    , case when h=i or j = k then 1 else 0 end) as situation2
    , case when l = m then 1 else 0 end) as situation 3
    ) as CA_Logic_Simplifier
    Where situation1 = 1 and situation2 = 1 and situation3 = 1
    Although you could say, "Hey, this is basically doing the same thing as before", this approach would be far easier to test and debug, because you can at a glance look at the values for situation1, 2, 3, etc. to see where errors are being introduced. 
    The cross apply makes the columns situation1/2/3 "instantiated", so they are usable in the where clause. Divide and conquer.  

  • Performance of Creating Spatial Indexes

    I have a spatial database with about 75GB of data in it. When I load this data initially it takes about 6 hours to load using 6 processes. To get this performance level I did not create any of the indexes or contsraints. So after the load I have to run the scripts to create the indexes and constraints.
    To improve the performance of this I have written a script on UNIX which parses my SQL files and runs each create or alter statement in a separate process. The script makes sure that there are only a certain number of concurrent processes (10).
    Creating the indexes is taking longer than the database load itself. There is one point layer in particular which has serveral hundred million rows which takes around 6 hours to complete. Are the any ways you can improve the performance of index creation. I did try the parallel option once but it did not reliably complete when I did my testing.
    Does using Oracle Partitioning improve the performance of index creation? I do have a mapsheet attribute which could be used for the partitioning.
    Paul

    Hi Paul,
    Parallelism should have reliably helped. I've heard a lot of good things about it more recently (i.e. if you tested on an earlier version you may want to upgrade/patch and check it out).
    Partitioning should improve index creation speed as well. If you tend to query by an attribute, use that attribute as the partition key. If you tend to query by location (spatial query), try to use a partition key that reflects location (state, county, etc).
    When you first create the index, create it local (partitioned) as unusable, then create each partition's index separately in parallel - you can use the script you've already written to do this.
    Since it is point data, make sure to use layer_gtype=point
    Here is a quick example:
    CREATE INDEX partn_table_sidx ON partn_table(geom)
      INDEXTYPE IS MDSYS.SPATIAL_INDEX
      PARAMETERS ('LAYER_GTYPE=POINT')
    LOCAL (
      PARTITION P1 PARAMETERS (TABLESPACE=’P1_TBS’),
      PARTITION P2 PARAMETERS (TABLESPACE=’P2_TBS’),
      PARTITION P3 PARAMETERS (TABLESPACE=’P3_TBS’),
      PARTITION P4 PARAMETERS (TABLESPACE=’P4_TBS’))
    UNUSABLE;
    ALTER INDEX partn_table_sidx REBUILD PARTITION P1;
    ALTER INDEX partn_table_sidx REBUILD PARTITION P2;
    ALTER INDEX partn_table_sidx REBUILD PARTITION P3;
    ALTER INDEX partn_table_sidx REBUILD PARTITION P4;

  • Performance problem with inner join

    Hi
    With this Query
    SELECT *
    FROM TABLE1
    INNER JOIN TABLE2
    ON TABLE1.Col1 = TABLE2.Col2 AND TABLE1.Col2 = TABLE2.Col2
    WHERE TABLE1.Col3 = 'AB' AND
    TABLE2.Col4 = 'ZZ';
    TABLE1 have 6,000,000 of records
    TABLE2 have 9,000,000 of records
    when I run this query the result take 30 secs
    If I change the Optimizer_mode for 'RULE'
    the result take 4 secs
    All statistics is ok
    Primary Key exists for TABLE1 and TABLE2 base-on Col1 and Col2
    And index on Table1.Col3,Table1.Col4
    somebody can help me ?

    Analyze tables compute statistics
    and analyze index compute statistics
    I join explain plan
    STATEMENT_ID TIMESTAMP REMARKS OPERATION OPTIONS OBJECT_NODE OBJECT_OWNER OBJECT_NAME OBJECT_INSTANCE OBJECT_TYPE OPTIMIZER SEARCH_COLUMNS ID PARENT_ID POSITION COST CARDINALITY BYTES
    OTHER_TAG PARTITION_START PARTITION_STOP PARTITION_ID OTHER DISTRIBUTION CPU_COST IO_COST TEMP_SPACE
    WithRule1 2004-01-19 16:28:43 SELECT STATEMENT RULE 0
    WithRule1 2004-01-19 16:28:43 SORT AGGREGATE 1 0 1
    WithRule1 2004-01-19 16:28:43 NESTED LOOPS 2 1 1
    WithRule1 2004-01-19 16:28:43 TABLE ACCESS BY INDEX ROWID MICRODEV T088_INSC 1 ANALYZED 3 2 1
    WithRule1 2004-01-19 16:28:43 INDEX RANGE SCAN MICRODEV IX4_T088_INSC NON-UNIQUE ANALYZED 2 4 3 1
    WithRule1 2004-01-19 16:28:43 TABLE ACCESS BY INDEX ROWID MICRODEV T090_CPOS_DEM 2 ANALYZED 5 2 2
    WithRule1 2004-01-19 16:28:43 INDEX UNIQUE SCAN MICRODEV PK_T090_CPOS_DEM UNIQUE ANALYZED 2 6 5 1
    7 rows selected.
    STATEMENT_ID TIMESTAMP REMARKS OPERATION OPTIONS OBJECT_NODE OBJECT_OWNER OBJECT_NAME OBJECT_INSTANCE OBJECT_TYPE OPTIMIZER SEARCH_COLUMNS ID PARENT_ID POSITION COST CARDINALITY BYTES
    OTHER_TAG PARTITION_START PARTITION_STOP PARTITION_ID OTHER DISTRIBUTION CPU_COST IO_COST TEMP_SPACE
    WithChoose1 2004-01-19 16:29:37 SELECT STATEMENT CHOOSE 0 21680 21680 1 40
    21680
    WithChoose1 2004-01-19 16:29:37 SORT AGGREGATE 1 0 1 1 40
    WithChoose1 2004-01-19 16:29:37 HASH JOIN 2 1 1 21680 59050 2362000
    21680 3875000
    WithChoose1 2004-01-19 16:29:37 TABLE ACCESS BY INDEX ROWID MICRODEV T088_INSC 1 ANALYZED 3 2 1 7031 96727 2708356
    7031
    WithChoose1 2004-01-19 16:29:37 INDEX RANGE SCAN MICRODEV IX4_T088_INSC NON-UNIQUE ANALYZED 2 4 3 1 232 96727
    232
    WithChoose1 2004-01-19 16:29:37 TABLE ACCESS FULL MICRODEV T090_CPOS_DEM 2 ANALYZED 5 2 2 11224 5662693 67952316
    11224
    6 rows selected.

  • Performance Tuning - remove hash join

    Hi Every one,
    Can some one help in tuning below query, i have hash join taking around 84%, 
    SELECT
    PlanId
    ,ReplacementPlanId
    FROM
    ( SELECT
    pl.PlanId
    ,xpl.PlanId ReplacementPlanId
    ,ROW_NUMBER() OVER(PARTITION BY pl.PlanId ORDER BY xpl.PlanId) RN
    FROM [dbo].[Plan] pl
    JOIN [dbo].[Plan] xpl
    ON pl.PPlanId = xpl.PPlanId
    AND pl.Name = xpl.Name
    WHERE
    pl.SDate > (CONVERT(CHAR(10),DATEADD(M,-12,GETDATE()),120)) AND
    xpl.Live = 1
    AND pl.TypeId = 7
    AND xpl.TypeId = 7
    ) p
    WHERE RN = 1
    Thanks in advance

    Can you show an execution plan of the query? Is that possible to rewrite the query as 
    Sorry cannot test it right now
    SELECT
    PlanId
    ,ReplacementPlanId
    FROM
    (SELECT PlanId,Name,SDate,TypeId FROM [dbo].[Plan]) pl
    CROSS APPLY 
     SELECT TOP (1) TypeId ,Live FROM [Plan] xpl
     WHERE  pl.PPlanId = xpl.PPlanId
    AND pl.Name = xpl.Name
    ) AS Der
    WHERE pl.SDate > (CONVERT(CHAR(10),DATEADD(M,-12,GETDATE()),120)) AND  
    Der.Live = 1
    AND pl.TypeId = 7
    AND Der.TypeId = 7
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Poor performance in a simple join query

    We have 4 tables:
    -- Customer
    CREATE TABLE "Customer" (
      "CustomerId" RAW(16) NOT NULL,
      "MnemonicId" NUMBER(20) );
    ALTER TABLE "Customer"
      ADD CONSTRAINT "PK_Customer"
      PRIMARY KEY ("CustomerId");
    -- Language
    CREATE TABLE "Language" (
      "Description" NVARCHAR2(250),
      "LanguageId" NVARCHAR2(12));
    CREATE UNIQUE INDEX "PK_Language" ON "Language"
    ("LanguageId");
    ALTER TABLE "Language" ADD (
      CONSTRAINT "PK_Language"
      PRIMARY KEY ("LanguageId"));
    -- CustomerDescription
    CREATE TABLE "CustomerDescription" (
      "Description" NVARCHAR2(250),
      "CustomerId" RAW(16) NOT NULL,
      "LanguageId" NVARCHAR2(12) NOT NULL);
    ALTER TABLE "CustomerDescription"
      ADD CONSTRAINT "PK_CustomerDescription"
      PRIMARY KEY ("CustomerId", "LanguageId");
    ALTER TABLE "CustomerDescription" ADD (
      CONSTRAINT "FK_CustomerDesc1" FOREIGN KEY ("CustomerId") REFERENCES "Customer" ("CustomerId"),
      CONSTRAINT "FK_CustomerDesc2" FOREIGN KEY ("LanguageId") REFERENCES "Language" ("LanguageId"));
    -- JOINTABLE
    CREATE TABLE JOINTABLE (ID  RAW(16) NOT NULL );We have also built a view vwCustomers on the tables: Customer, CustomerDescription, Language.
    CREATE OR REPLACE FORCE VIEW "vwCustomers" (
      "Description",  "CustomerId",  "LanguageId",  "MnemonicId")
    AS
       SELECT "CustomerDescription"."Description",
              "Customer"."CustomerId",
              "Language"."LanguageId",
              "Customer"."MnemonicId"
         FROM "Customer" CROSS JOIN "Language"
              LEFT OUTER JOIN "CustomerDescription"
              ON "Customer"."CustomerId" = "CustomerDescription"."CustomerId"
            AND "CustomerDescription"."LanguageId" = "Language"."LanguageId"The JOINTABLE table has only 1 row ("9C740128F750CF4ABC520DAF131D7E96")
    The language table has 2 rows ("it-IT") and ("en-EN")
    The Customer and CustometDescription tables has 350000 rows each
    We have this simple query:
    SELECT ROWNUM pos, VW."CustomerId", VW."LanguageId", VW."MnemonicId"
            FROM "vwCustomers" VW
            WHERE (VW."LanguageId" = 'it-IT')
            AND VW."CustomerId" IN ( SELECT Id FROM JOINTABLE)this query of course select only 1 row.
    The time execution of this query is about 1 second, that for us is a really bad performance result.
    We have also rewritten the query without the VIEW :
    SELECT ROWNUM pos, "Customer"."CustomerId", "Language"."LanguageId", "Customer"."MnemonicId"
        FROM "Customer"
        CROSS JOIN "Language"
        LEFT OUTER JOIN "CustomerDescription"
        ON "Customer"."CustomerId" = "CustomerDescription"."CustomerId"
        AND "CustomerDescription"."LanguageId" = "Language"."LanguageId"
        WHERE ("Language"."LanguageId" = 'it-IT' )
        AND "Customer"."CustomerId" IN ( SELECT Id FROM JOINTABLE)Also for this query the execution time is about 1 second.
    BUT if we write the query in a similar "way":
    SELECT  ROWNUM pos, VW."CustomerId", VW."LanguageId", VW."MnemonicId"
            FROM "vwCustomers" VW
            WHERE (VW."LanguageId" = 'it-IT')
            AND VW."CustomerId" IN (HEXTORAW('9C740128F750CF4ABC520DAF131D7E96'))NOW we obtain as execution time of 0.0005 second!!!
    We discover that when it takes 1 second in the first 2 queries this is because the access plan used has done a TABLE ACCESS FULL on the Customer table (that has 350000 rows). In the third query we have good performance because Oracle uses an INDEX UNIQUE SCAN on Customer table.
    Please, could help me to obtain good performance in the first query?
    thanks in advance
    Filip
    Edited by: [email protected] on 2-set-2009 12.59

    The first execution plan shows at point 3 the TABLE ACCESS FULL SCAN on the table Customer that has Cardinality of 359,793
    SELECT STATEMENT  ALL_ROWS Cost: 2,476  Bytes: 130  Cardinality: 1                                
         9 COUNT                           
              8 NESTED LOOPS OUTER  Cost: 2,476  Bytes: 130  Cardinality: 1                      
                   6 HASH JOIN RIGHT SEMI  Cost: 2,475  Bytes: 102  Cardinality: 1                 
                        1 TABLE ACCESS FULL TABLE JOINTABLE Cost: 3  Bytes: 17  Cardinality: 1            
                        5 VIEW SYS. Cost: 2,470  Bytes: 30,582,405  Cardinality: 359,793            
                             4 NESTED LOOPS  Cost: 2,470  Bytes: 17,629,857  Cardinality: 359,793       
                                  2 INDEX UNIQUE SCAN INDEX (UNIQUE)PK_Language Cost: 0  Bytes: 11  Cardinality: 1 
                                  3 TABLE ACCESS FULL TABLE Customer Cost: 2,470  Bytes: 13,672,134  Cardinality: 359,793 
                   7 INDEX UNIQUE SCAN INDEX (UNIQUE) PK_CustomerDescription Cost: 1  Bytes: 28  Cardinality: 1       In the second case at point 3 instead of TABLE ACCESS FULL SCAN Oracle execute an efficient TABLE ACCESS BY INDEX ROWID
    SELECT STATEMENT  ALL_ROWS Cost: 3  Bytes: 99  Cardinality: 1                                
         8 COUNT                           
              7 MERGE JOIN OUTER  Cost: 3  Bytes: 99  Cardinality: 1                      
                   5 VIEW SYS. Cost: 2  Bytes: 71  Cardinality: 1                 
                        4 NESTED LOOPS  Cost: 2  Bytes: 49  Cardinality: 1            
                             1 INDEX UNIQUE SCAN INDEX (UNIQUE) PK_Language Cost: 0  Bytes: 11  Cardinality: 1       
                             3 TABLE ACCESS BY INDEX ROWID TABLE Customer Cost: 2  Bytes: 38  Cardinality: 1       
                                  2 INDEX UNIQUE SCAN INDEX (UNIQUE) PK_Customer Cost: 1  Cardinality: 1 
                   6 INDEX UNIQUE SCAN INDEX (UNIQUE) PK_ CustomerDescription Cost: 1  Bytes: 28  Cardinality: 1       

Maybe you are looking for

  • BRtools table space creation error

    hi, Iam trying to create new table space in my R/3 system. When i went to brtools - space management sytem throwing error owner failed.I tried with all users to login like ( <SID>adm,administrator etc ...)even then same problem.Could you please sugge

  • Can you use apple tv for 2 televisions

    i have apple tv hooked up to a samsung tv.  i have another samsung tv and would like to be able to use the apple tv on both samsung tv's.  both samsung tv are lan connected to my router. 

  • Remove password in clear text warning.

    After I bound my Lion Server to an AD account and set it up for Profile Manager (http://support.apple.com/kb/HT4837) I have a warning message when i login saying that my password will be sent in clear text. I want to get rid of this message. I have S

  • Is CS5 compatible with Mac OS 10.8.5?

    Is CS5 compatible with Mac OS 10.8.5? I am trying to use CS3, but am having a lot of problems with InDesign & Photoshop. Thanks

  • IPhone 4 Camera Autofocus Delay after Upgrade to iOS 5

    I just updated my iPhone 4 to iOS 5 and now I noticed the camera auto focus is severly delayed, and constantly searching for focus. I compared it side by side with my son's iPhone 4 which I did not update to iOS 5 and there is a distinct difference i