explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YOql

Settings
# exclusive inclusive rows x rows loops node
1. 0.393 10,905.077 ↑ 32.3 31 1

Function Scan on generate_series dd (cost=0.00..72,317,903.39 rows=1,000 width=16) (actual time=266.354..10,905.077 rows=31 loops=1)

2.          

SubPlan (forFunction Scan)

3. 38.936 8,332.800 ↑ 1.0 1 31

Aggregate (cost=40,672.29..40,672.30 rows=1 width=8) (actual time=268.800..268.800 rows=1 loops=31)

4. 72.640 8,293.864 ↓ 6.4 9,607 31

Nested Loop (cost=0.42..40,668.54 rows=1,499 width=0) (actual time=97.775..267.544 rows=9,607 loops=31)

5. 5,237.884 5,237.884 ↓ 6.4 9,624 31

Seq Scan on profile_site ps (cost=0.00..28,935.22 rows=1,503 width=41) (actual time=97.748..168.964 rows=9,624 loops=31)

  • Filter: (((site_id)::text = 'eq4xTsvKZZYX3Nyb1hajkkwZdO03'::text) AND (date_trunc('day'::text, created_at) = date_trunc('day'::text, dd.dd)))
  • Rows Removed by Filter: 556556
6. 2,983.340 2,983.340 ↑ 1.0 1 298,334

Index Scan using profiles_pkey on profiles p (cost=0.42..7.81 rows=1 width=41) (actual time=0.010..0.010 rows=1 loops=298,334)

  • Index Cond: ((id)::text = (ps.id)::text)
  • Filter: ((arena_user_id IS NULL) AND (user_id IS NULL))
  • Rows Removed by Filter: 0
7. 0.341 2,571.884 ↑ 1.0 1 31

Aggregate (cost=31,645.58..31,645.59 rows=1 width=8) (actual time=82.964..82.964 rows=1 loops=31)

8. 28.427 2,571.543 ↓ 4.0 16 31

Nested Loop (cost=1,000.55..31,645.57 rows=4 width=0) (actual time=46.805..82.953 rows=16 loops=31)

9. 0.000 1,653.416 ↑ 1.1 1,148 31

Gather (cost=1,000.00..21,130.81 rows=1,300 width=41) (actual time=0.130..53.336 rows=1,148 loops=31)

  • Workers Planned: 2
  • Workers Launched: 2
10. 1,913.320 1,913.320 ↑ 1.4 383 93

Parallel Seq Scan on profiles p_1 (cost=0.00..20,000.81 rows=542 width=41) (actual time=1.167..61.720 rows=383 loops=93)

  • Filter: ((arena_user_id IS NOT NULL) OR (user_id IS NOT NULL))
  • Rows Removed by Filter: 170701
11. 889.700 889.700 ↓ 0.0 0 35,588

Index Scan using profile_site_pkey on profile_site ps_1 (cost=0.55..8.09 rows=1 width=41) (actual time=0.025..0.025 rows=0 loops=35,588)

  • Index Cond: (((id)::text = (p_1.id)::text) AND ((site_id)::text = 'eq4xTsvKZZYX3Nyb1hajkkwZdO03'::text))
  • Filter: (date_trunc('day'::text, created_at) = date_trunc('day'::text, dd.dd))
  • Rows Removed by Filter: 0
Planning time : 0.778 ms
Execution time : 10,905.630 ms