MDL-46015 lesson: Optimise report - use recordsets

Change-Id: I61f3ed30c6dbd8f88d1dfb1adfe2fc291853e0e1