dump script for m5nr to solr
optimization: reduce perl memory footprint when doing SQL queries