How would make a news feed \"friendly\" database design, so that it wouldn\'t be extremely expensive to get all of the items (query) to put in the news feed? The only way I can
UNION = expensive, because the complete result set is subject to a DISTINCT operation. UNION ALL = cheaper, because it is effectively multiple queries for which the results of each are appended together.
It depends on the data volume, or course.
The main driver of efficiency would be the individual queries that are unioned together, but there's no reason why selecting the most recent (say) 10 records from each of 10 tables should take more than a small fraction of a second.