Re: bind variable problem
- From: ks.anand80@xxxxxxxxx
- Date: 30 Jan 2007 18:52:18 -0800
Hi everyone,
Actually I am not getting any error message. The query seems to be
executing which I found by querying the v$session
v$sqltext_with_newlines sql and eventually succeeds. However I found
a few things. But not sure if this is oracle related or perl related
stuff.
I have posted the same in comp.databases.oracle.server.
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
- if less than 5 bind variables are used
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.
Any ideas?
Regards,
Anand.
On Jan 24, 1:19 am, martin.ev...@xxxxxxxxxxxx (Martin Evans) wrote:
Ronald Kimball wrote:
Martin Evans [mailto:martin.ev...@xxxxxxxxxxxx] wrote:
You haven't called $lcsr->bind_param for the parmeters!
You don't need to call bind_param() if you pass the parameter values in the call
to execute(), as Anand is doing.
I know that, sorry, I missed that.
Perhaps if Anand told us what the error is.
Martin
--
Martin J. Evans
Easysoft Limitedhttp://www.easysoft.com
.
- References:
- bind variable problem
- From: Anand . K . S .
- Re: bind variable problem
- From: Martin Evans
- RE: bind variable problem
- From: Ronald Kimball
- Re: bind variable problem
- From: Martin Evans
- bind variable problem
- Prev by Date: Re: installing DBD-Informix on fedora 6
- Next by Date: RE: Can't call method "prepare" on an undefined value
- Previous by thread: Re: bind variable problem
- Next by thread: Re: bind variable problem
- Index(es):
Relevant Pages
|