explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bMD : new query

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.140 0.683 ↓ 1.2 17 1

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

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

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

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

Seq Scan on receipts r0 (cost=0.00..8.82 rows=47 width=20) (actual time=0.025..0.118 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.023 0.286 ↓ 1.2 17 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
5. 0.103 0.263 ↓ 1.2 17 1

Seq Scan on receipt_job_states (cost=0.00..32.21 rows=14 width=8) (actual time=0.077..0.263 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 : 3.798 ms
Execution time : 0.859 ms