Added indices on uid and pid for prematrix in precomputation.jsp