optimize getPostSummaryByPids