explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MFi6

Settings
# exclusive inclusive rows x rows loops node
1. 35.781 588.898 ↓ 23,311.5 46,623 1

Nested Loop (cost=71,921.69..72,635.86 rows=2 width=124) (actual time=0.066..588.898 rows=46,623 loops=1)

2.          

CTE growing_links

3. 168.066 371.567 ↓ 590.2 46,623 1

Recursive Union (cost=4.77..71,920.86 rows=79 width=102) (actual time=0.038..371.567 rows=46,623 loops=1)

4. 0.017 0.041 ↑ 2.2 4 1

Bitmap Heap Scan on "CustomerSupplierLink" (cost=4.77..176.63 rows=9 width=95) (actual time=0.035..0.041 rows=4 loops=1)

  • Recheck Cond: ((buyer)::text = '554a8c469b72473f5ef49b2f'::text)
  • Filter: (customer = 33)
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=2
5. 0.024 0.024 ↑ 9.2 5 1

Bitmap Index Scan on "CustomerSupplerBuyer_index" (cost=0.00..4.76 rows=46 width=0) (actual time=0.024..0.024 rows=5 loops=1)

  • Index Cond: ((buyer)::text = '554a8c469b72473f5ef49b2f'::text)
6. 140.585 203.460 ↓ 12,847.7 89,934 5

Hash Join (cost=867.73..7,174.26 rows=7 width=102) (actual time=8.313..40.692 rows=89,934 loops=5)

  • Hash Cond: (((csl.buyer)::text = (gcsl_1.seller)::text) AND (csl.tier = (gcsl_1.tier + 1)))
  • Join Filter: ((csl.seller)::text <> (gcsl_1.root)::text)
  • Rows Removed by Join Filter: 0
7. 32.700 46.835 ↓ 1.0 46,624 5

Bitmap Heap Scan on "CustomerSupplierLink" csl (cost=865.25..6,768.79 rows=46,043 width=62) (actual time=3.066..9.367 rows=46,624 loops=5)

  • Recheck Cond: (customer = 33)
  • Heap Blocks: exact=10,075
8. 14.135 14.135 ↓ 1.0 46,624 5

Bitmap Index Scan on "CustomerSupplerCustomer_index" (cost=0.00..853.74 rows=46,043 width=0) (actual time=2.827..2.827 rows=46,624 loops=5)

  • Index Cond: (customer = 33)
9. 8.930 16.040 ↓ 310.8 9,325 5

Hash (cost=2.02..2.02 rows=30 width=76) (actual time=3.208..3.208 rows=9,325 loops=5)

  • Buckets: 32,768 (originally 1024) Batches: 1 (originally 1) Memory Usage: 3,135kB
10. 7.110 7.110 ↓ 310.8 9,325 5

WorkTable Scan on growing_links gcsl_1 (cost=0.00..2.02 rows=30 width=76) (actual time=0.005..1.422 rows=9,325 loops=5)

  • Filter: (limiter > 0)
11. 17.916 506.494 ↓ 6,660.4 46,623 1

Nested Loop (cost=0.42..656.93 rows=7 width=124) (actual time=0.056..506.494 rows=46,623 loops=1)

12. 395.332 395.332 ↓ 590.2 46,623 1

CTE Scan on growing_links gcsl (cost=0.00..1.58 rows=79 width=108) (actual time=0.040..395.332 rows=46,623 loops=1)

13. 93.246 93.246 ↑ 1.0 1 46,623

Index Scan using "CustomerSupplierPK" on "CustomerSupplier" csseller (cost=0.42..8.29 rows=1 width=41) (actual time=0.002..0.002 rows=1 loops=46,623)

  • Index Cond: ((customer = gcsl.customer) AND ((supplier)::text = (gcsl.seller)::text))
14. 46.623 46.623 ↑ 1.0 1 46,623

Index Scan using "CustomerSupplierPK" on "CustomerSupplier" csbuyer (cost=0.42..8.29 rows=1 width=41) (actual time=0.001..0.001 rows=1 loops=46,623)

  • Index Cond: ((customer = gcsl.customer) AND ((supplier)::text = (gcsl.buyer)::text))
Planning time : 1.530 ms
Execution time : 595.670 ms