explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ng58

Settings
# exclusive inclusive rows x rows loops node
1. 3,197.544 26,768.872 ↑ 1.0 3,189,193 1

Gather (cost=713,821.14..3,603,918.86 rows=3,189,994 width=4,081) (actual time=12,776.993..26,768.872 rows=3,189,193 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=35,518,483 read=12,152 dirtied=525, temp read=563,957 written=565,076
2. 1,980.735 23,571.328 ↑ 1.3 1,063,064 3 / 3

Nested Loop (cost=712,821.14..3,283,919.46 rows=1,329,164 width=4,081) (actual time=12,765.77..23,571.328 rows=1,063,064 loops=3)

  • Buffers: shared hit=35,518,483 read=12,152 dirtied=525, temp read=563,957 written=565,076
3. 1,215.361 19,464.464 ↑ 1.3 1,063,064 3 / 3

Nested Loop (cost=712,820.72..2,685,478.73 rows=1,329,164 width=3,281) (actual time=12,765.756..19,464.464 rows=1,063,064 loops=3)

  • Buffers: shared hit=22,761,164 read=12,152 dirtied=525, temp read=563,957 written=565,076
4. 4,625.748 15,059.910 ↑ 1.3 1,063,064 3 / 3

Hash Join (cost=712,820.3..2,087,038 rows=1,329,164 width=2,481) (actual time=12,765.718..15,059.91 rows=1,063,064 loops=3)

  • Buffers: shared hit=10,009,890 read=12,152 dirtied=525, temp read=563,957 written=565,076
5. 1,030.448 1,030.448 ↑ 1.3 1,063,064 3 / 3

Seq Scan on cards_order cards_order (cost=0..709,072.64 rows=1,329,164 width=1,474) (actual time=0.01..1,030.448 rows=1,063,064 loops=3)

  • Buffers: shared hit=695,781
6. 2,093.731 9,403.714 ↑ 1.2 1,059,369 3 / 3

Hash (cost=529,688.35..529,688.35 rows=1,322,476 width=1,007) (actual time=9,403.714..9,403.714 rows=1,059,369 loops=3)

  • Buffers: shared hit=9,314,053 read=12,152 dirtied=525, temp written=227,216
7. 2,500.122 7,309.983 ↑ 1.2 1,059,369 3 / 3

Merge Join (cost=5.57..529,688.35 rows=1,322,476 width=1,007) (actual time=0.546..7,309.983 rows=1,059,369 loops=3)

  • Buffers: shared hit=9,314,053 read=12,152 dirtied=525
8. 1,537.311 1,537.311 ↑ 1.2 1,059,369 3 / 3

Index Scan using billing_invoice_payment_id_b072ec6a on billing_invoice billing_invoice (cost=0.43..283,177.7 rows=1,322,476 width=397) (actual time=0.021..1,537.311 rows=1,059,369 loops=3)

  • Buffers: shared hit=3,042,916 read=12,150 dirtied=203
9. 3,272.550 3,272.550 ↓ 1.0 3,180,263 3 / 3

Index Scan using billing_payment_pkey on billing_payment billing_payment (cost=0.43..222,048.98 rows=3,174,755 width=610) (actual time=0.011..3,272.55 rows=3,180,263 loops=3)

  • Buffers: shared hit=6,271,137 read=2 dirtied=322
10. 3,189.193 3,189.193 ↑ 1.0 1 3,189,193 / 3

Index Scan using customers_customer_pkey on customers_customer customers_customer (cost=0.42..0.45 rows=1 width=800) (actual time=0.003..0.003 rows=1 loops=3,189,193)

  • Index Cond: (cards_order.created_by_id = customers_customer.id)
  • Buffers: shared hit=12,751,274
11. 2,126.129 2,126.129 ↑ 1.0 1 3,189,193 / 3

Index Scan using customers_customer_pkey on customers_customer t3 (cost=0.42..0.45 rows=1 width=800) (actual time=0.002..0.002 rows=1 loops=3,189,193)

  • Index Cond: (cards_order.customer_id = t3.id)
  • Buffers: shared hit=12,757,319
Planning time : 1.528 ms
Execution time : 27,672.849 ms