do per-test sql lookup