Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Slow INSERT SQL

Status
Not open for further replies.

bowettwow

Programmer
Aug 1, 2002
57
GB
I have a python script that is inserting about 7000 records (each with 15 fields of 25 chars or less) into a DBF.

Each SQL statement is stored as a String in a list. I loop through the list executing each statment as I go. The problem I have is it seems to be running slowly. It takes approximately 10 minutes to run the whole thing.

Is there any way I can speed up this process???
 
Update:

I have tried writing it to an Access Table and it runs about 10 times faster. I'm therefore guessing that DBASE isn't the best way to go when doing these sorts of operations.

Any speed suggestions would still be appreciated.
 

Put it in MySQL?

That's about the best suggestion I can make, it isn't a Python speed problem, it's a problem with your database.
 
eric,

Thanks for the suggestion. I knew there was a speed difference between databases but wasn't aware the difference was so vast. I guess this is a good demonstration...

Cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top