[#1164] add SQL indexes for activity and resource tables

Fix for #1164