explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yMcA

Settings
# exclusive inclusive rows x rows loops node
1. 0.223 1,235.587 ↑ 681.7 90 1

Nested Loop (cost=313,322.74..314,997.82 rows=61,354 width=8) (actual time=1,234.958..1,235.587 rows=90 loops=1)

2.          

CTE lc1

3. 0.130 1,234.713 ↑ 315.7 90 1

Unique (cost=312,540.91..312,682.98 rows=28,415 width=8) (actual time=1,234.521..1,234.713 rows=90 loops=1)

4. 0.156 1,234.583 ↑ 315.7 90 1

Sort (cost=312,540.91..312,611.95 rows=28,415 width=8) (actual time=1,234.518..1,234.583 rows=90 loops=1)

  • Sort Key: l1.le_leftentity
  • Sort Method: quicksort Memory: 29kB
5. 119.872 1,234.427 ↑ 315.7 90 1

Merge Join (cost=309,134.73..310,439.00 rows=28,415 width=8) (actual time=1,088.261..1,234.427 rows=90 loops=1)

  • Merge Cond: (l2.le_leftentity = l1.le_rightentity)
6. 0.021 25.630 ↑ 3,637.5 6 1

Sort (cost=103,843.45..103,898.01 rows=21,825 width=8) (actual time=25.622..25.630 rows=6 loops=1)

  • Sort Key: l2.le_leftentity
  • Sort Method: quicksort Memory: 25kB
7. 20.208 25.609 ↑ 3,637.5 6 1

Bitmap Heap Scan on linkentity_flat l2 (cost=1,037.01..102,270.56 rows=21,825 width=8) (actual time=7.849..25.609 rows=6 loops=1)

  • Recheck Cond: ((le_typename)::text = 'CARD_has_ORGA'::text)
  • Filter: ((hashed SubPlan 1) OR (le_rightentity = 2,062,126))
  • Rows Removed by Filter: 42,815
  • Heap Blocks: exact=9,674
8. 4.764 4.764 ↑ 1.0 42,821 1

Bitmap Index Scan on idx_le_flat_typename (cost=0.00..1,023.79 rows=43,648 width=0) (actual time=4.763..4.764 rows=42,821 loops=1)

  • Index Cond: ((le_typename)::text = 'CARD_has_ORGA'::text)
9.          

SubPlan (for Bitmap Heap Scan)

10. 0.634 0.637 ↑ 1,000.0 1 1

ProjectSet (cost=0.00..5.27 rows=1,000 width=8) (actual time=0.634..0.637 rows=1 loops=1)

11. 0.003 0.003 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.001..0.003 rows=1 loops=1)

12. 290.810 1,088.925 ↑ 1.1 162,742 1

Sort (cost=205,291.25..205,746.76 rows=182,205 width=16) (actual time=965.295..1,088.925 rows=162,742 loops=1)

  • Sort Key: l1.le_rightentity
  • Sort Method: quicksort Memory: 14,686kB
13. 798.115 798.115 ↓ 1.0 182,223 1

Seq Scan on linkentity_flat l1 (cost=0.00..189,370.90 rows=182,205 width=16) (actual time=0.099..798.115 rows=182,223 loops=1)

  • Filter: ((le_typename)::text = 'PUBL_has_CARD'::text)
  • Rows Removed by Filter: 941,648
14. 0.156 1,235.004 ↑ 2.2 90 1

HashAggregate (cost=639.34..641.34 rows=200 width=8) (actual time=1,234.932..1,235.004 rows=90 loops=1)

  • Group Key: lc1.lid
15. 1,234.848 1,234.848 ↑ 315.7 90 1

CTE Scan on lc1 (cost=0.00..568.30 rows=28,415 width=8) (actual time=1,234.523..1,234.848 rows=90 loops=1)

16. 0.360 0.360 ↑ 1.0 1 90

Index Scan using dataentity_flat_pkey on dataentity_flat df (cost=0.42..8.36 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=90)

  • Index Cond: (de_id = lc1.lid)
  • Filter: (de_entitytype = 495)
Planning time : 0.537 ms
Execution time : 1,236.763 ms