make the query fast for dogssake

Change-Id: Ie343db133578c7e0848290129c646c41f3ccba31