always try kill -15 processid, then kill -2 processid(if -15 didn't work), before resorting tokill -9 processid
(ps -auxorps -efto see processes).
interesting distinct count optimisation: https://www.periscope.io/blog/use-subqueries-to-count-distinct-50x-faster.html