Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Is it possible to run SQL select in Oracle ... tl;dr

by roboticus (Canon)
on Nov 25, 2013 at 15:26 UTC ( #1064224=note: print w/ replies, xml ) Need Help??


in reply to Is it possible to run SQL select in Oracle and SQL Server to get a large recordset and import it straight into an array, looking to avoid using rownext

newbieperlperson:

You've already gotten some good answers (e.g., selectall_arrayref), so I won't elaborate on that.

However, your claim that retrieving 8,000 rows will take forever when doing so one at a time doesn't seem reasonable. I do it all the time, and it doesn't really take much time at all. I'm wondering whether you're optimizing prematurely, since you mention that you're planning some items. I frequently pull tens or hundreds of thousands of rows at a time from our server, but generally use the slower fetchrow_hashref which is normally quite fast enough.

I think you may be making yourself think too hard about the problem, rather than solving it in a straightforward way, and improving the solution if/when it proves insufficient.

Note: I tried to link to the specific documentation for fetchrow_hashref in DBI, but can't seem to figure out how to link it nicely.

Update: I gave up and hardcoded a link.

...roboticus

When your only tool is a hammer, all problems look like your thumb.


Comment on Re: Is it possible to run SQL select in Oracle ... tl;dr
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (15)
As of 2014-08-01 17:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (37 votes), past polls