msc: Fix CSV export

Make CSV export usable.
Preserve MySQL health from too much useless requests