explain.depesz.com

PostgreSQL's explain analyze made readable

Result: msRN

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 1,305.592 ↑ 1.0 1 1

Limit (cost=172,690.74..216,451.94 rows=1 width=1,632) (actual time=1,305.591..1,305.592 rows=1 loops=1)

  • Buffers: shared hit=22,013, temp read=476 written=4,927
2. 0.012 1,305.590 ↑ 93.0 1 1

Nested Loop Left Join (cost=172,690.74..4,242,482.34 rows=93 width=1,632) (actual time=1,305.590..1,305.590 rows=1 loops=1)

  • Buffers: shared hit=22,013, temp read=476 written=4,927
3. 0.009 1,004.410 ↑ 93.0 1 1

Nested Loop (cost=139,818.84..1,185,393.32 rows=93 width=40) (actual time=1,004.410..1,004.410 rows=1 loops=1)

  • Buffers: shared hit=21,757, temp read=476 written=4,927
4. 0.003 1,004.362 ↑ 426,212.0 1 1

Unique (cost=139,818.28..146,996.68 rows=426,212 width=32) (actual time=1,004.362..1,004.362 rows=1 loops=1)

  • Buffers: shared hit=21,752, temp read=476 written=4,927
5. 799.478 1,004.359 ↑ 957,120.0 1 1

Sort (cost=139,818.28..142,211.08 rows=957,120 width=32) (actual time=1,004.359..1,004.359 rows=1 loops=1)

  • Sort Key: mdl_engage_actions_table_p1_yaddr_v4.organization_uuid, mdl_engage_actions_table_p1_yaddr_v4.person_uuid
  • Sort Method: external merge Disk: 39,352kB
  • Buffers: shared hit=21,752, temp read=476 written=4,927
6. 204.881 204.881 ↑ 1.0 957,120 1

Seq Scan on mdl_engage_actions_table_p1_yaddr_v4 (cost=0.00..31,323.20 rows=957,120 width=32) (actual time=0.009..204.881 rows=957,120 loops=1)

  • Buffers: shared hit=21,752
7. 0.039 0.039 ↑ 1.0 1 1

Index Scan using "t_person_dim$idx1" on t_person_dim_backend p (cost=0.56..2.43 rows=1 width=40) (actual time=0.039..0.039 rows=1 loops=1)

  • Index Cond: ((organization_uuid = mdl_engage_actions_table_p1_yaddr_v4.organization_uuid) AND (person_uuid = mdl_engage_actions_table_p1_yaddr_v4.person_uuid))
  • Filter: ((longitude IS NOT NULL) AND (latitude IS NOT NULL))
  • Buffers: shared hit=5
8. 299.732 301.168 ↑ 1.0 1 1

Aggregate (cost=32,871.90..32,871.91 rows=1 width=1,600) (actual time=301.168..301.168 rows=1 loops=1)

  • Buffers: shared hit=256
9. 1.436 1.436 ↑ 4.2 180 1

Index Scan using "mdl_engage_actions_table_p1_yaddr_v4$idx2" on mdl_engage_actions_table_p1_yaddr_v4 s (cost=0.67..852.70 rows=761 width=21) (actual time=0.109..1.436 rows=180 loops=1)

  • Index Cond: ((cube_enlarge((ll_to_earth((p.latitude)::double precision, (p.longitude)::double precision))::cube, '3999.99993444938'::double precision, 3) @> (ll_to_earth((latitude)::double precision, (longitude)::double precision))::cube) AND (activity_date > (now() - '2 years'::interval)))
  • Filter: (p.person_uuid <> person_uuid)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=256
Planning time : 18.155 ms
Execution time : 1,317.252 ms