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

Home -> Community -> Mailing Lists -> Oracle-L -> Wrong results. 10053 event help

Wrong results. 10053 event help

From: Mandar A. Ghosalkar <mghosalk_at_byer.com>
Date: Thu, 17 Apr 2003 11:47:05 -0800
Message-ID: <F001.00584419.20030417114705@fatcity.com>


Well I am very lucky today.

After cloning a 8.1.7 db I found a query would return diff results with and without cbo or by changing the sequence of expr in the where clause. Can anyone help me understand the 10053 trace output before apply 8.1.7.4 patch and remove this bug.

Case 1: with cbo and all analyzed, return zero rows. Wrong Result.

SELECT "USER_OR_TEAM_ID",

"ID_TYPE",
"ITEM_TYPE",
"ITEM1_ID",
"ITEM2_ID",
"ITEM3_ID",
"ITEM4_ID",
"ITEM5_ID",
"ITEM6_ID",
"PRV",
"GRANT_DENY_FLAG"
FROM acl WHERE ( (id_type = 1 AND user_or_team_id IN (SELECT user_id FROM my_user_id)) or (id_type = 2 AND user_or_team_id IN (SELECT team_id FROM my_team)) ) Case 2: with cbo and all analyzed but changing the order of expr in the
where clause, returns 16 rows. Correct result.
SELECT "USER_OR_TEAM_ID",

"ID_TYPE",
"ITEM_TYPE",
"ITEM1_ID",
"ITEM2_ID",
"ITEM3_ID",
"ITEM4_ID",
"ITEM5_ID",
"ITEM6_ID",
"PRV",
"GRANT_DENY_FLAG"
FROM acl WHERE ( (id_type = 2 AND user_or_team_id IN (SELECT team_id FROM my_team)) or (id_type = 1 AND user_or_team_id IN (SELECT user_id FROM my_user_id)) ) Case 3: with rule hint, return 16 rows. Correct result. SELECT /*+ RULE */ "USER_OR_TEAM_ID",
"ID_TYPE",
"ITEM_TYPE",
"ITEM1_ID",
"ITEM2_ID",
"ITEM3_ID",
"ITEM4_ID",
"ITEM5_ID",
"ITEM6_ID",
"PRV",
"GRANT_DENY_FLAG"

  FROM acl
 WHERE (
       (id_type = 1 AND user_or_team_id IN (SELECT user_id FROM my_user_id))
                 or
       (id_type = 2 AND user_or_team_id IN (SELECT team_id FROM
my_team))       
       )

Below is the 10053 trace output for the explain plan explain plan for SELECT "USER_OR_TEAM_ID",

"ID_TYPE",
"ITEM_TYPE",
"ITEM1_ID",
"ITEM2_ID",
"ITEM3_ID",
"ITEM4_ID",
"ITEM5_ID",
"ITEM6_ID",
"PRV",
"GRANT_DENY_FLAG"

  FROM acl
 WHERE (
       (id_type = 1 AND user_or_team_id IN (SELECT user_id FROM my_user_id))

                 or
       (id_type = 2 AND user_or_team_id IN (SELECT team_id FROM
my_team))       
       );

***********************

Dump file E:\oracle\admin\SMPS\udump\ORA00336.TRC Thu Apr 17 11:40:55 2003
ORACLE V8.1.7.0.0 - Production vsnsta=0
vsnsql=e vsnxtr=3
Windows 2000 Version 5.0 Service Pack 3, CPU type 586 Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production JServer Release 8.1.7.0.0 - Production
Windows 2000 Version 5.0 Service Pack 3, CPU type 586 Instance name: smps

Redo thread mounted by this instance: 1

Oracle process number: 9

Windows thread id: 336, image: ORACLE.EXE

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: ListGuru_at_fatcity.com (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). Received on Thu Apr 17 2003 - 14:47:05 CDT

Original text of this message

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