Optimize queries for computer inventory