explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4hZr

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 2.517 25.502 ↑ 1.0 176 1

Unique (cost=49.93..53.89 rows=176 width=116) (actual time=21.747..25.502 rows=176 loops=1)

2. 2.647 22.985 ↑ 1.0 176 1

Sort (cost=49.93..50.37 rows=176 width=116) (actual time=21.734..22.985 rows=176 loops=1)

  • Sort Key: sub.document, sub.code, sub.title, sub.subject_id, sub.seq, (min((c.lo)::text)), (max((c.hi)::text)), (min(sub.year))
  • Sort Method: quicksort Memory: 45kB
3. 3.848 20.338 ↑ 1.0 176 1

HashAggregate (cost=41.61..43.37 rows=176 width=116) (actual time=19.106..20.338 rows=176 loops=1)

  • Group Key: sub.subject_id
4. 8.034 16.490 ↑ 1.9 339 1

Hash Join (cost=8.37..35.32 rows=629 width=56) (actual time=2.957..16.490 rows=339 loops=1)

  • Hash Cond: (c.subject_id = sub.subject_id)
5. 5.661 5.661 ↑ 1.0 775 1

Seq Scan on categories c (cost=0.00..17.75 rows=775 width=8) (actual time=0.014..5.661 rows=775 loops=1)

6. 1.474 2.795 ↑ 1.0 176 1

Hash (cost=6.17..6.17 rows=176 width=52) (actual time=2.789..2.795 rows=176 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 22kB
7. 1.321 1.321 ↑ 1.0 176 1

Seq Scan on subjects sub (cost=0.00..6.17 rows=176 width=52) (actual time=0.011..1.321 rows=176 loops=1)

  • Filter: (is_custom IS TRUE)
  • Rows Removed by Filter: 41
Planning time : 0.682 ms
Execution time : 28.115 ms