explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LrxE

Settings
# exclusive inclusive rows x rows loops node
1. 2.530 51.266 ↓ 5.4 720 1

Hash Semi Join (cost=3,419.12..4,007.99 rows=134 width=40) (actual time=46.859..51.266 rows=720 loops=1)

  • Hash Cond: (kfm_reports.id = latestkfmreportsids.id)
2. 1.931 1.931 ↑ 1.0 26,723 1

Seq Scan on kfm_reports (cost=0.00..517.23 rows=26,723 width=40) (actual time=0.033..1.931 rows=26,723 loops=1)

3. 0.195 46.805 ↓ 5.4 720 1

Hash (cost=3,417.45..3,417.45 rows=134 width=4) (actual time=46.804..46.805 rows=720 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 34kB
4. 1.910 46.610 ↓ 5.4 720 1

Subquery Scan on latestkfmreportsids (cost=2,482.14..3,417.45 rows=134 width=4) (actual time=26.435..46.610 rows=720 loops=1)

  • Filter: (latestkfmreportsids.ordering = 1)
  • Rows Removed by Filter: 26,003
5. 15.950 44.700 ↑ 1.0 26,723 1

WindowAgg (cost=2,482.14..3,083.41 rows=26,723 width=24) (actual time=26.433..44.700 rows=26,723 loops=1)

6. 20.713 28.750 ↑ 1.0 26,723 1

Sort (cost=2,482.14..2,548.95 rows=26,723 width=16) (actual time=26.407..28.750 rows=26,723 loops=1)

  • Sort Key: kfm_reports_1.site_id, kfm_reports_1.year DESC, kfm_reports_1.quarter DESC
  • Sort Method: quicksort Memory: 2,021kB
7. 8.037 8.037 ↑ 1.0 26,723 1

Seq Scan on kfm_reports kfm_reports_1 (cost=0.00..517.23 rows=26,723 width=16) (actual time=0.022..8.037 rows=26,723 loops=1)

Planning time : 0.783 ms