Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Data insert into DB

by sundialsvc4 (Abbot)
on Aug 10, 2011 at 16:37 UTC ( [id://919703]=note: print w/replies, xml ) Need Help??


in reply to Data insert into DB

When you say fifty minutes for a mere 4,200 rows, then my first assumption would be that the script (which I have not inspected closely...) simply has a bug in it.

When a database has “incredibly bad performance,” especially on inserts, updates and deletes, then you can pretty much hang your hat on the assumption that the system thinks that it has to commit to disk and verify every single disk-I/O operation that it is doing.   (SQLite, for example, will do this unless told otherwise.)   The trick, then, is to make sensible use of transactions.   When a transaction is in progress, the DB knows that it can “lazy write.”

Nevertheless, I agree with the earlier post:   this looks merely like a job for “a bulk loader,” and there’s a plenty of those.   I would be profoundly surprised if you actually had to “write a program” to do this at all.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-24 18:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found