Working on some query optimizations for feeds