When searching a path / drv path, use separate queries for both options to prevent seq. scan.