Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by roboticus (Chancellor)
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 making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2015-07-28 02:57 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 (251 votes), past polls