DBD::Oracle: Row cache fetch ahead on cursor returned from PL/SQL stored proc?

2007-01-19 Thread Joel Noble
Hello, all! I'm having slow performance reading from a cursor that is returned from a stored procedure. Network tracing and strace confirms that a round-trip is being done to the Oracle DB to fetch each row, with no pre-caching. Using DBI-1.52, DBD-Oracle-1.18 on Linux with Perl 5.8.5 and

RE: :Oracle: Row cache fetch ahead on cursor returned from PL/SQL stored proc?

2007-01-19 Thread Reidy, Ron
Joel, To really know understand the problem, you should gather an extended SQL trace (event 10046) at the DB level at level 8 or higher - http://orafaq.com/faqdbain.htm#EVENTS After the program has completed, you will need to get the trace file from the server's udump directory and format it

RE: environment variable

2007-01-19 Thread Reidy, Ron
Oscar, Short answer - you cannot (sort of). This is because your shell script will execute in a sub shell of your perl program. However, you can do something like this: # untested system(export VAR=val; /path/to/your/shell/script.sh); I think that might work for you. -- Ron Reidy Lead DBA

Re: environment variable

2007-01-19 Thread Scott Smith
Reidy, Ron wrote: Oscar, Short answer - you cannot (sort of). This is because your shell script will execute in a sub shell of your perl program. However, you can do something like this: # untested system(export VAR=val; /path/to/your/shell/script.sh); The shell also takes a series of zero

Re: environment variable

2007-01-19 Thread Jonathan Leffler
The solution I proposed works - and I tested it. #!/bin/perl -w $ENV{MY_ENVIRONMENT_VARIABLE} = Quixotic Response; system(env); However, this is Perl - TMTOWTDI! If you want to undo the setting after running the shell, either localize %ENV or delete the new variable. { local(%ENV) = %ENV;

RE: environment variable

2007-01-19 Thread Rutherdale, Will
The standard Unix semantics is this: a child process inherits the environment from its parent. Therefore if you (export and) set an environment variable in a process and then run a script, it will see that environment variable. Furthermore, _Programming Perl, 3rd ed_ by Wall et all says this

Re: OT: environment variable

2007-01-19 Thread David Dooling
On Wed, Jan 17, 2007 at 8:59AM, Oscar Gomez wrote: how can i export a variable from program perl to shell script through environment variable. This is not really a DBI question, so you will have better luck posting this type of question to perl-monks (http://www.perlmonks.org/) or similar

Re: environment variable

2007-01-19 Thread Alexander Foken
Once more, there is more than one way to do it ... Modifying %ENV, perhaps with local, seems to be the cleanest and fastest way. do { local $ENV{'FOO'}='bar'; local $ENV{'GOD'}='Larry'; system('/usr/local/bin/shellscript.sh','--do-something'); }; Fiddling with the shell in system() looks AT

patches available for DBD::Multi, and benchmarking results

2007-01-19 Thread Mark Stosberg
Some other folks may be interested in the patches I've published for DBD::Multi recently: http://rt.cpan.org/Public/Dist/Display.html?Name=DBD-Multi Perhaps most interesting might be a benchmarking script I made, and related optimization patches: http://rt.cpan.org/Ticket/Display.html?id=24460

RE: :Oracle: Row cache fetch ahead on cursor returned from PL/SQL stored proc?

2007-01-19 Thread Joel Noble
Thanks -- will give that a try. Can I assume this means you believe that DBD::Oracle/DBI should indeed be pre-caching rows in the reading from the cursor that was received from the procedure? That is, it is reasonable to think that it should be doing pre-caching and that it's a bug

Re: environment variable - Mea Culpa

2007-01-19 Thread Jonathan Leffler
On 1/19/07, Jonathan Leffler [EMAIL PROTECTED] wrote: The solution I proposed works [...] I sent it on the 17th. Unfortunately, I only sent it to Oscar, not to dbi-users as well. Sorry - my mistake - both then and earlier today. This subject should now be closed. -- Jonathan Leffler

Re: OT: environment variable

2007-01-19 Thread Ron Savage
On Fri, 19 Jan 2007 13:52:40 -0600, David Dooling wrote: Hi David If you want the Perl program to alter the environment of the process that executed it (a shell, cron, another script, etc.), that is not possible. Errr, actually it is possible, at least under Windows. And that's another good