Copy link to clipboard
Copied
One of our largest web applications is written in CF. Some of the CFC's I have developed are increasingly complex as the years go by. It is becoming obvious that a web app was not meant to handle these things. For instance I have one that parses a text file and places that data into a database. The text files can be anywhere from 50kb to 2mb. A CFC like this could take forever to accomplish this task or it could get hung up by running out of memory.
Would it behoove me to rewrite these scripts in java or something so that my other users don't experience performance problems when im running these huge tasks? would Java, Ruby or C handle this type of this all that much more efficiently??
TIA
Copy link to clipboard
Copied
If the database has a bulk loading utility, that would be the best choice.
Copy link to clipboard
Copied
+1 Dan
The stuff SQL Server / Oracle / probably MySQL have built-in is probably far more efficient than anything you could quickly knock up, and has the added advantage of still being editable by all (in the context of a SSIS package, for example).
What database engine are you using?
Copy link to clipboard
Copied
mysql 5
Copy link to clipboard
Copied
In which case, you want LOAD DATA INFILE by the looks of it. Looks extremely similar to Oracle's SQL Loader syntax.
Dump the file where you want it, write yourself a query (which you can reuse) and MySQL will load the data before ColdFusion would've even woken up.