Beefy Boxes and Bandwidth Generously Provided by pair Networks kudra
Keep It Simple, Stupid
 
PerlMonks  

Re^2: 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

by afoken (Parson)
on Nov 26, 2013 at 19:28 UTC ( #1064451=note: print w/ replies, xml ) Need Help??


in reply to Re: 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
in thread 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

Right. A simple SELECT without a complex WHERE and no LOBs returning "just" 8000 rows should happen almost instantly on Oracle. If not, start by issuing the same SQL statement in SQLplus or similar, if that is slow, consult the Oracle admin.

About fifteen years ago, I filled an Oracle table with a few thousand rows of simple address data (id, name, street, town, phone, email), the following "SELECT * FROM $table" several minutes. My Oracle guru just muttered "primary key?", and of course, my CREATE TABLE lacked the PRIMARY KEY on the id column. So Oracle had do to a full table scan for each record I selected. Adding the primary key to the ID column reduced the time required to a few milliseconds.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)


Comment on Re^2: 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
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2014-04-21 10:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (492 votes), past polls