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

Home -> Community -> Usenet -> c.d.o.server -> Query hangs when executed through perl

Query hangs when executed through perl

From: <ks.anand80_at_gmail.com>
Date: 30 Jan 2007 17:50:26 -0800
Message-ID: <1170208226.175133.145680@p10g2000cwp.googlegroups.com>


Hi,

Here is the problem I am facing.

A perl script hangs when executing the following piece of sql

$lsql = "SELECT NVL2(partition_name,

                            segment_name || ':' || partition_name,
                            segment_name)
                  FROM user_segments
                 WHERE segment_type IN ('TABLE', 'TABLE PARTITION') 
AND
                       segment_name NOT IN
                       (SELECT object_name
                          FROM recyclebin bin) AND
                       segment_name NOT IN (?,?,?,?,?) order by desc;

However the query went through fine if
- the "use encoding;" (that enforces utf8 encoding) is commented out
in the script or
- if the bind variables are hard-coded or

Execution plan showed that a cartesian join was implemented when use encoding or no bind varaibles or less than 5 bind variables are used whereas hash join
was implemented when no encoding is used. Let me know if you need the execution plans for the scenarios.

What is even more confusing is that the exact same query works in an environment which uses oracle 9i whereas fails in the env which uses oracle 10g.

Tried hinting FIRST_ROWS, then NO_MERGE. Didn't help.

Kindly help.

Regards,
Anand. Received on Tue Jan 30 2007 - 19:50:26 CST

Original text of this message

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