explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9CKf

Settings
# exclusive inclusive rows x rows loops node
1. 0.026 15.820 ↑ 11.6 5 1

GroupAggregate (cost=14,714.30..14,718.21 rows=58 width=531) (actual time=15.810..15.820 rows=5 loops=1)

  • Group Key: s.id, c.name, p.formal_name, p.first_name, p.last_name, shp.activity
2. 0.028 15.794 ↑ 5.8 10 1

Sort (cost=14,714.30..14,714.44 rows=58 width=370) (actual time=15.793..15.794 rows=10 loops=1)

  • Sort Key: s.id, c.name, p.formal_name, p.first_name, p.last_name, shp.activity
  • Sort Method: quicksort Memory: 30kB
3. 0.009 15.766 ↑ 5.8 10 1

Nested Loop Left Join (cost=2.52..14,712.60 rows=58 width=370) (actual time=13.756..15.766 rows=10 loops=1)

4. 0.002 15.727 ↑ 5.8 10 1

Nested Loop Left Join (cost=2.10..14,647.70 rows=58 width=343) (actual time=13.746..15.727 rows=10 loops=1)

5. 0.027 15.711 ↑ 8.0 2 1

Nested Loop Left Join (cost=1.68..14,621.22 rows=16 width=280) (actual time=13.736..15.711 rows=2 loops=1)

  • Join Filter: (shc.id_country = c.id)
  • Rows Removed by Join Filter: 362
6. 0.001 15.590 ↑ 8.0 2 1

Nested Loop Left Join (cost=1.68..14,559.93 rows=16 width=279) (actual time=13.638..15.590 rows=2 loops=1)

7. 0.002 15.577 ↑ 7.5 2 1

Nested Loop Left Join (cost=1.39..14,539.80 rows=15 width=271) (actual time=13.627..15.577 rows=2 loops=1)

8. 0.002 15.553 ↑ 7.5 2 1

Nested Loop Left Join (cost=1.10..14,516.84 rows=15 width=258) (actual time=13.617..15.553 rows=2 loops=1)

9. 0.002 15.540 ↑ 15.0 1 1

Nested Loop Left Join (cost=0.69..14,493.36 rows=15 width=250) (actual time=13.606..15.540 rows=1 loops=1)

10. 15.530 15.530 ↑ 15.0 1 1

Index Scan using series_pkey on series s (cost=0.41..14,462.35 rows=15 width=240) (actual time=13.596..15.530 rows=1 loops=1)

  • Filter: ((created_at > '2018-01-01 00:00:00'::timestamp without time zone) AND ((gid)::text = 'series.series._.23190'::text))
  • Rows Removed by Filter: 18615
11. 0.008 0.008 ↓ 0.0 0 1

Index Scan using series_has_release_id_series_idx on series_has_release shr (cost=0.28..2.06 rows=1 width=14) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: (id_series = s.id)
  • Filter: ((released_at IS NOT NULL) AND (NOT ((tags)::ltree[] ~ 'Generic.Flag.NotReleasedYet'::lquery)))
12. 0.011 0.011 ↑ 1.0 2 1

Index Only Scan using series_has_company_pkey on series_has_company shcp (cost=0.41..1.54 rows=2 width=16) (actual time=0.011..0.011 rows=2 loops=1)

  • Index Cond: (id_series = s.id)
  • Heap Fetches: 0
13. 0.002 0.022 ↑ 2.0 1 2

Append (cost=0.29..1.51 rows=2 width=29) (actual time=0.006..0.011 rows=1 loops=2)

14. 0.012 0.012 ↑ 1.0 1 2

Index Scan using company_pkey on company cp (cost=0.29..0.40 rows=1 width=26) (actual time=0.005..0.006 rows=1 loops=2)

  • Index Cond: (shcp.id_company = id)
15. 0.008 0.008 ↓ 0.0 0 2

Index Scan using theater_theater_id_idx on theater cp_1 (cost=0.41..1.11 rows=1 width=31) (actual time=0.004..0.004 rows=0 loops=2)

  • Index Cond: (shcp.id_company = id)
16. 0.012 0.012 ↑ 1.0 1 2

Index Only Scan using series_has_country_pkey on series_has_country shc (cost=0.29..1.33 rows=1 width=16) (actual time=0.006..0.006 rows=1 loops=2)

  • Index Cond: (id_series = s.id)
  • Heap Fetches: 0
17. 0.049 0.094 ↑ 1.2 182 2

Materialize (cost=0.00..10.22 rows=215 width=17) (actual time=0.006..0.047 rows=182 loops=2)

18. 0.045 0.045 ↑ 1.2 182 1

Seq Scan on country c (cost=0.00..9.15 rows=215 width=17) (actual time=0.004..0.045 rows=182 loops=1)

19. 0.014 0.014 ↑ 1.0 5 2

Index Only Scan using series_has_person_id_series_id_person_activity_key on series_has_person shp (cost=0.42..1.61 rows=5 width=71) (actual time=0.006..0.007 rows=5 loops=2)

  • Index Cond: (id_series = s.id)
  • Heap Fetches: 0
20. 0.030 0.030 ↑ 1.0 1 10

Index Scan using person_pkey on person p (cost=0.42..1.12 rows=1 width=43) (actual time=0.003..0.003 rows=1 loops=10)

  • Index Cond: (shp.id_person = id)
Planning time : 4.240 ms
Execution time : 16.016 ms