Optimize queryies for list views