   (mq/with-collection EXERCISE 
     (mq/find query)
     (mq/sort {:creationDate 1})
-    (mq/batch-size 5000)))
+    (mq/batch-size 1000)))
 
 (defn csv-escape [field]
   (let [s (str field)]

                     get-pace
                     tags])))

(def ex-filter 
  {:creationDate {"$gte" (time/date-time 2013 1 1)}})

(defn to-csv [exs] 
  (str

(defn export [params]
  (.info logger (str "Exporting csv " params))
  (if-let [user (:user params)]
    (let [year (if (:year params) (Integer/valueOf (:year params)) (time/year (time/now)))]
      (to-csv (exs (ex-filter year user))))
    ""))
