CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: DBI: Re: [jhumkey] WHERE has changed to Numeric Comparison: Edit Log



FishMonger
Veteran / Moderator

Jan 23, 2015, 8:00 AM


Views: 23725
Re: [jhumkey] WHERE has changed to Numeric Comparison

With that few of rows the script should be able to complete in less than a minute, unless there is additional heavy processing that needs to occur. But even then it should not take 15+ minutes.

There's an easy "in-between" solution which should improve the efficiency. Load the csv file into a mysql db via LOAD DATA INFILE Syntax. http://dev.mysql.com/doc/refman/5.1/en/load-data.html

Then do your sql processing in mysql and output the the table to csv via SELECT ... INTO OUTFILE Syntax.
http://dev.mysql.com/doc/refman/5.1/en/select-into.html

The mysql table would need to be truncated prior to each import.

This approach would definitely be much faster than what you're currently doing. Possibly down to as low as 10 seconds.


(This post was edited by FishMonger on Jan 23, 2015, 8:04 AM)


Edit Log:
Post edited by FishMonger (Veteran) on Jan 23, 2015, 8:01 AM
Post edited by FishMonger (Veteran) on Jan 23, 2015, 8:04 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives