-- L6 (a) parent scalar projection — SELECT new carrier(f.id, u.name, u.username, p.url, p.title, f.firstHighlightedAt)
-- FeedProjectionIT.l6ExplainProjectionHasLimitAndSemiJoinNotNarrowerWidth (seed 100, page size 20)
-- SELECT fi.id, u.name, u.username, p.url, p.title, fi.first_highlighted_at
--   FROM feed_items fi JOIN users u ON u.id = fi.user_id JOIN pages p ON p.id = fi.page_id
--   ORDER BY fi.first_highlighted_at DESC, fi.id ASC LIMIT 20
-- 읽기 포인트: Limit 노드 존재(페이징 정상)이나 width=2088 로 엔티티 SELECT fi.*(L5 (a) width 1194)보다 넓다
--            — users/pages 조인 + PG varchar 추정치 탓. 프로젝션 이득은 EXPLAIN 아니라 ORM 층(entityLoadCount 0).

Limit  (cost=102.56..102.61 rows=20 width=2088) (actual time=0.187..0.190 rows=20 loops=1)
  Buffers: shared hit=81
  ->  Sort  (cost=102.56..103.17 rows=246 width=2088) (actual time=0.187..0.188 rows=20 loops=1)
        Sort Key: fi.first_highlighted_at DESC, fi.id
        Sort Method: top-N heapsort  Memory: 27kB
        Buffers: shared hit=81
        ->  Hash Join  (cost=51.24..96.01 rows=246 width=2088) (actual time=0.137..0.161 rows=100 loops=1)
              Hash Cond: (fi.page_id = p.id)
              Buffers: shared hit=81
              ->  Hash Join  (cost=10.68..54.79 rows=246 width=1072) (actual time=0.072..0.087 rows=100 loops=1)
                    Hash Cond: (fi.user_id = u.id)
                    Buffers: shared hit=43
                    ->  Seq Scan on feed_items fi  (cost=0.00..43.46 rows=246 width=56) (actual time=0.053..0.057 rows=100 loops=1)
                          Buffers: shared hit=41
                    ->  Hash  (cost=10.30..10.30 rows=30 width=1048) (actual time=0.010..0.010 rows=20 loops=1)
                          Buckets: 1024  Batches: 1  Memory Usage: 10kB
                          Buffers: shared hit=2
                          ->  Seq Scan on users u  (cost=0.00..10.30 rows=30 width=1048) (actual time=0.003..0.004 rows=20 loops=1)
                                Buffers: shared hit=2
              ->  Hash  (cost=39.14..39.14 rows=114 width=1048) (actual time=0.059..0.059 rows=100 loops=1)
                    Buckets: 1024  Batches: 1  Memory Usage: 17kB
                    Buffers: shared hit=38
                    ->  Seq Scan on pages p  (cost=0.00..39.14 rows=114 width=1048) (actual time=0.040..0.045 rows=100 loops=1)
                          Buffers: shared hit=38
Planning Time: 0.134 ms
Execution Time: 0.228 ms
