Switch MySQL cursors to server-side

When processing large amounts of data, the probe would use excessive memory. This was due to using client-side database cursors. Switching to server-side resolves the problem.