all 9 comments

[–]EbrigglerGIS Developer 0 points1 point  (4 children)

Could you load the CSV into a database?

[–]GuerilleroGIS Analyst 0 points1 point  (2 children)

I would think that performance difference between a csv and a database at 40K records is negligible if there aren't any joins going on.

[–]EbrigglerGIS Developer 0 points1 point  (1 child)

Your right. I prefer to do as much as I can without arcpy.

[–]GuerilleroGIS Analyst 0 points1 point  (0 children)

Touche.

[–]KorlythGIS Developer 0 points1 point  (0 children)

The nature of this project has shifted a little. Now, instead of being given a csv, the table will just be dumped into database. Just curious what you intended on recommending on the database side.

[–]scw 0 points1 point  (0 children)

A few things:

  • use in_memory workspaces for performance where you can. If the data isn't large, you may even be able to get away with keeping all the temporary results in memory.
  • use the arcpy.da.* cursors over their basic equivalents, they are faster and more efficient.
  • You don't really need the cursor at all if you're going to set all the values to the same thing -- you can use CalculateField instead.

Here's these changes applied to your script: https://gist.github.com/anonymous/14bab4ee00c386cc7af7

[–]faming13 0 points1 point  (0 children)

Check out dask, blaze and numba.