explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0DLo

Settings
# exclusive inclusive rows x rows loops node
1. 2,350.010 17,418.083 ↑ 26.0 1 1

Gather Merge (cost=2,752,964.35..2,752,967.38 rows=26 width=4,092) (actual time=15,073.301..17,418.083 rows=1 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=26,165,262, temp read=481,873 written=482,480
2. 0.034 15,068.073 ↓ 0.0 0 3 / 3

Sort (cost=2,751,964.32..2,751,964.36 rows=13 width=4,092) (actual time=15,068.073..15,068.073 rows=0 loops=3)

  • Sort Key: cards_order.created_at DESC, cards_order.id DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=26,165,262, temp read=481,873 written=482,480
3. 0.004 15,068.039 ↓ 0.0 0 3 / 3

Nested Loop (cost=270,098.28..2,751,964.08 rows=13 width=4,092) (actual time=14,366.477..15,068.039 rows=0 loops=3)

  • Buffers: shared hit=26,165,234, temp read=481,873 written=482,480
4. 1,497.127 15,068.024 ↓ 0.0 0 3 / 3

Nested Loop (cost=270,097.85..2,751,956.44 rows=13 width=3,472) (actual time=14,366.462..15,068.024 rows=0 loops=3)

  • Filter: (((cards_order.uid)::text ~~ 'A'::text) OR ((customers_customer.email)::text ~~ 'A'::text) OR ((t3.email)::text ~~ 'A'::text) OR ((billing_invoice.number)::text ~~ 'A'::text) OR ((cards_order.client_reference)::text ~~ 'A'::text))
  • Buffers: shared hit=26,165,229, temp read=481,873 written=482,480
5. 1,072.847 11,462.451 ↑ 1.3 1,054,223 3 / 3

Nested Loop (cost=270,097.43..2,128,375.65 rows=1,318,814 width=2,672) (actual time=5,402.692..11,462.451 rows=1,054,223 loops=3)

  • Buffers: shared hit=13,514,004, temp read=481,873 written=482,480
6. 4,169.344 7,226.935 ↑ 1.3 1,054,223 3 / 3

Hash Join (cost=270,097.01..1,534,468.04 rows=1,318,814 width=1,872) (actual time=5,402.662..7,226.935 rows=1,054,223 loops=3)

  • Buffers: shared hit=868,824, temp read=481,873 written=482,480
7. 1,068.839 1,068.839 ↑ 1.3 1,054,223 3 / 3

Seq Scan on cards_order cards_order (cost=0..708,969.14 rows=1,318,814 width=1,475) (actual time=0.008..1,068.839 rows=1,054,223 loops=3)

  • Buffers: shared hit=695,781
8. 1,240.576 1,988.752 ↑ 1.2 1,050,518 3 / 3

Hash (cost=186,064.34..186,064.34 rows=1,307,734 width=397) (actual time=1,988.751..1,988.752 rows=1,050,518 loops=3)

  • Buffers: shared hit=172,987, temp written=147,968
9. 748.176 748.176 ↑ 1.2 1,050,518 3 / 3

Seq Scan on billing_invoice billing_invoice (cost=0..186,064.34 rows=1,307,734 width=397) (actual time=0.006..748.176 rows=1,050,518 loops=3)

  • Buffers: shared hit=172,987
10. 3,162.669 3,162.669 ↑ 1.0 1 3,162,669 / 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,162,669)

  • Index Cond: (cards_order.created_by_id = customers_customer.id)
  • Buffers: shared hit=12,645,180
11. 2,108.446 2,108.446 ↑ 1.0 1 3,162,669 / 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,162,669)

  • Index Cond: (cards_order.customer_id = t3.id)
  • Buffers: shared hit=12,651,225
12. 0.011 0.011 ↑ 1.0 1 1 / 3

Index Scan using billing_payment_pkey on billing_payment billing_payment (cost=0.43..0.59 rows=1 width=608) (actual time=0.034..0.034 rows=1 loops=1)

  • Index Cond: (billing_invoice.payment_id = billing_payment.id)
  • Buffers: shared hit=5
Planning time : 1.315 ms
Execution time : 17,418.447 ms