explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Nhez

Settings
# exclusive inclusive rows x rows loops node
1. 11.500 4,110.948 ↓ 2.0 78,551 1

Merge Anti Join (cost=263,234.15..282,530.90 rows=40,079 width=58) (actual time=3,996.662..4,110.948 rows=78,551 loops=1)

  • Merge Cond: (c.id = a.id)
2.          

CTE activity

3. 3,869.022 3,960.291 ↑ 179.6 44,627 1

ProjectSet (cost=0.00..76,348.85 rows=8,015,800 width=40) (actual time=2.610..3,960.291 rows=44,627 loops=1)

4. 11.781 91.269 ↓ 1.0 80,853 1

Result (cost=0.00..15,629.16 rows=80,158 width=89) (actual time=0.011..91.269 rows=80,853 loops=1)

5. 7.748 79.488 ↓ 1.0 80,853 1

Append (cost=0.00..14,827.58 rows=80,158 width=89) (actual time=0.010..79.488 rows=80,853 loops=1)

6. 18.545 18.545 ↓ 1.0 39,359 1

Seq Scan on company (cost=0.00..2,344.64 rows=38,664 width=84) (actual time=0.009..18.545 rows=39,359 loops=1)

7. 53.195 53.195 ↑ 1.0 41,494 1

Seq Scan on theater (cost=0.00..12,482.94 rows=41,494 width=94) (actual time=0.011..53.195 rows=41,494 loops=1)

8. 7.571 102.557 ↓ 1.0 80,853 1

Merge Append (cost=0.71..17,894.69 rows=80,158 width=58) (actual time=0.037..102.557 rows=80,853 loops=1)

  • Sort Key: c.id
9. 35.129 35.129 ↓ 1.0 39,359 1

Index Scan using company_pkey on company c (cost=0.29..2,978.90 rows=38,664 width=55) (actual time=0.021..35.129 rows=39,359 loops=1)

10. 59.857 59.857 ↑ 1.0 41,494 1

Index Scan using theater_theater_id_idx on theater c_1 (cost=0.41..14,314.60 rows=41,494 width=60) (actual time=0.014..59.857 rows=41,494 loops=1)

11. 1.128 3,996.891 ↑ 34.8 2,302 1

Sort (cost=186,884.59..187,084.99 rows=80,158 width=8) (actual time=3,996.620..3,996.891 rows=2,302 loops=1)

  • Sort Key: a.id
  • Sort Method: quicksort Memory: 204kB
12. 3,995.763 3,995.763 ↑ 34.8 2,302 1

CTE Scan on activity a (cost=0.00..180,355.50 rows=80,158 width=8) (actual time=17.312..3,995.763 rows=2,302 loops=1)

  • Filter: (type = ANY ('{Company.Activity.TheaterChain,Company.Activity.Press}'::ltree[]))
  • Rows Removed by Filter: 42325
Planning time : 0.827 ms
Execution time : 4,116.129 ms