explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mgD4 : old

Settings
# exclusive inclusive rows x rows loops node
1. 0.104 0.612 ↓ 1.2 17 1

Sort (cost=41.75..41.79 rows=14 width=20) (actual time=0.607..0.612 rows=17 loops=1)

  • Sort Key: r0.id DESC
  • Sort Method: quicksort Memory: 26kB
2. 0.086 0.508 ↓ 1.2 17 1

Hash Semi Join (cost=32.39..41.49 rows=14 width=20) (actual time=0.450..0.508 rows=17 loops=1)

  • Hash Cond: (r0.id = receipt_job_states.receipt_id)
3. 0.097 0.097 ↑ 1.0 47 1

Seq Scan on receipts r0 (cost=0.00..8.82 rows=47 width=20) (actual time=0.023..0.097 rows=47 loops=1)

  • Filter: ((inserted_at >= '2019-01-01 00:00:00'::timestamp without time zone) AND (inserted_at <= '2019-12-31 00:00:00'::timestamp without time zone) AND (project_id = 1))
4. 0.035 0.325 ↓ 1.2 17 1

Hash (cost=32.21..32.21 rows=14 width=8) (actual time=0.325..0.325 rows=17 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
5. 0.130 0.290 ↓ 1.2 17 1

Seq Scan on receipt_job_states (cost=0.00..32.21 rows=14 width=8) (actual time=0.070..0.290 rows=17 loops=1)

  • Filter: (SubPlan 1)
  • Rows Removed by Filter: 15
6.          

SubPlan (forSeq Scan)

7. 0.024 0.160 ↑ 1.0 1 32

Result (cost=0.00..2.12 rows=1 width=8) (actual time=0.002..0.005 rows=1 loops=32)

  • One-Time Filter: (receipt_job_states.exit_code > 0)
8. 0.136 0.136 ↓ 2.0 2 17

Seq Scan on jobs (cost=0.00..2.12 rows=1 width=8) (actual time=0.003..0.008 rows=2 loops=17)

  • Filter: ((inserted_at >= '2019-01-01 00:00:00'::timestamp without time zone) AND (project_id = 1))
  • Rows Removed by Filter: 3
Planning time : 1.287 ms
Execution time : 0.735 ms