cancel
Showing results for 
Search instead for 
Did you mean: 

How identify the SQL code involved in a cartesian product?

0 Kudos

Hi Guys

I am surfing in errors related with cartesian products, my iq message log shows the follow message:

I. 04/22 16:28:25. 0000002105 Exception Thrown from dfo_Root.cxx:822, Err# 0, tid 3 origtid 3

I. 04/22 16:28:25. 0000002105    O/S Err#: 0, ErrID: 9216 (df_Exception); SQLCode: -1005015, SQLState: 'QTA15', Severity: 14

I. 04/22 16:28:25. 0000002105 [20169]: The optimizer was unable to find a query plan that avoided cartesian product joins larger than the Max_Cartesian_Result setting

-- (dfo_Root.cxx 822)

But is not clear, What kind of query is involved in this situation, How can I identify the objects or querys involved in this situation?

Best Regards

Jairo

Accepted Solutions (0)

Answers (1)

Answers (1)

Gisung
Advisor
Advisor
0 Kudos

Hi,

If you specify the -zo and -zr in cfg file, you can find this query which caused the problem with connhandle id.

[cfg]

-zr SQL

-zo ../../z.out

You can find the connhandle in iqmsg file.

Here is an example to find the sql using iqmsg and z.out file

IQ has been assigned the SA connhandle whenever IQ connects.


Here is an example.

Command is "select @@version".


[iqmsg]

I. 04/23 08:48:03. 0000000024 Connect:  SA connHandle: 1  SA connID: 24  IQ connID: 0000000024  User: DBA

I. 04/23 08:48:03. 0000000024 Cmt 3932758

I. 04/23 08:48:03. 0000000024 PostCmt 0

I. 04/23 08:48:15. 0000000024 Txn 3932771 0 3932771

[z.out]

+1,<,1,PREPARE,select @@version

=,>,1,PREPARE,327714

=,<,1,EXEC,327714

==

Gi-Sung Jang