Hello to everyone Info:
- oracle 9.0.1.4 64bit on Solaris 8 - Sun Fire 15000 Here is the query select * from glcomponents where (glorder = 1 and compvalue in ( select glcomp02 from chartofaccounts where glaccount like '01-_____-______-__-______-___-___%' and (disabled is null or disabled = 'N' ) and orgid = 'KNPC' ) ); When I execute this query within SQL*Plus, it is finished for less than secon. This is execution plan Elapsed: 00:00:04.01 Execution Plan ---------------------------------------------------------- 0 SELECT STATEMENT Optimizer=CHOOSE (Cost=617 Card=374 Bytes=4 3010) 1 0 HASH JOIN (SEMI) (Cost=617 Card=374 Bytes=43010) 2 1 TABLE ACCESS (FULL) OF 'GLCOMPONENTS' (Cost=16 Card=374 Bytes=26928) 3 1 TABLE ACCESS (FULL) OF 'CHARTOFACCOUNTS' (Cost=596 Card= 19589 Bytes=842327) When that query goes trough JDBC Thin Client, this is the execution plan which takes 4 minutes!!! (output from Ent. Manager) 5 SELECT STATEMENT 4 NESTED LOOPS [SEMI] 1 MAXIMO.GLCOMPONENTS TABLE ACCESS [FULL] 3 MAXIMO.CHARTOFACCOUNTS TABLE ACCESS [BY INDEX ROWID] 2 MAXIMO.COA_NDX1 INDEX [RANGE SCAN] Why do we see different exec. plans - one for SQL Plus (and Sql Navigator, also) and another for JDBC connection? Any hints, please? Thanks -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Vladimir Barac INET: [EMAIL PROTECTED] Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).