Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^6: Query takes 895ms in TOAD but 42s in DBI

by kubrat (Scribe)
on Dec 04, 2008 at 11:52 UTC ( #727940=note: print w/ replies, xml ) Need Help??


in reply to Re^5: Query takes 895ms in TOAD but 42s in DBI
in thread Query takes 895ms in TOAD but 42s in DBI

The only time I have seen this error was wheh calling bind_columns() before the execute() method. I don't quite understand your SQL because I am more of a Postgres man myself. Perhaps, someone with Oracle expetience can give a better advice. In Postgres you first declare your cursor which doesn't return any results - it's just a $dbh->do call which either succeedes or fails:

DECLARE my_cursor AS SELECT * FROM foo ;
Then you execute another query to begin fetching results from the cursor, for example:
FETCH ALL FROM my_cursor;
And it's here where I will use bind_coulumns() and fetch(). So, basically, the sql has to return rows for the bind_columns() call to work. What I don't understand is how does your original code work if the sql doesn't return any rows? Or perhaps it does but not immediately.


Comment on Re^6: Query takes 895ms in TOAD but 42s in DBI
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://727940]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2015-07-07 08:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (87 votes), past polls