explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3JeS

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 0.320 ↑ 1.0 5 1

Limit (cost=43.77..47.58 rows=5 width=69) (actual time=0.300..0.320 rows=5 loops=1)

2. 0.003 0.317 ↑ 1,890.4 5 1

Nested Loop (cost=43.77..7,263.94 rows=9,452 width=69) (actual time=0.299..0.317 rows=5 loops=1)

3. 0.017 0.304 ↑ 1,890.4 5 1

Hash Join (cost=43.49..4,319.83 rows=9,452 width=36) (actual time=0.291..0.304 rows=5 loops=1)

  • Hash Cond: ((SubPlan 1) = p.id)
4. 0.007 0.007 ↑ 1,890.4 5 1

Seq Scan on invoices i (cost=0.00..290.30 rows=9,452 width=29) (actual time=0.006..0.007 rows=5 loops=1)

  • Filter: ((invoice_status)::text = ANY ('{PAID,PROCESSING}'::text[]))
5. 0.123 0.270 ↓ 1.0 958 1

Hash (cost=31.55..31.55 rows=955 width=11) (actual time=0.270..0.270 rows=958 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 50kB
6. 0.147 0.147 ↓ 1.0 958 1

Seq Scan on purchase_log p (cost=0.00..31.55 rows=955 width=11) (actual time=0.003..0.147 rows=958 loops=1)

7.          

SubPlan (for Hash Join)

8. 0.010 0.010 ↑ 1.0 1 10

Index Scan using invoice_invoice_line_items_idx on invoice_line_items (cost=0.29..8.30 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=10)

  • Index Cond: (invoice_id = i.id)
9. 0.010 0.010 ↑ 1.0 1 5

Index Scan using cards_pkey on cards c (cost=0.28..0.31 rows=1 width=41) (actual time=0.002..0.002 rows=1 loops=5)

  • Index Cond: (id = i.card_id)
Planning time : 0.244 ms
Execution time : 0.349 ms