explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OehL

Settings
# exclusive inclusive rows x rows loops node
1. 0.011 3,989.767 ↑ 1.0 10 1

Limit (cost=172,690.74..610,302.74 rows=10 width=1,632) (actual time=1,439.974..3,989.767 rows=10 loops=1)

  • Buffers: shared hit=24,158, temp read=476 written=4,927
2. 0.233 3,989.756 ↑ 9.3 10 1

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

  • Buffers: shared hit=24,158, temp read=476 written=4,927
3. 0.078 1,131.173 ↑ 9.3 10 1

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

  • Buffers: shared hit=21,803, temp read=476 written=4,927
4. 0.020 1,130.805 ↑ 42,621.2 10 1

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

  • Buffers: shared hit=21,752, temp read=476 written=4,927
5. 920.671 1,130.785 ↑ 95,712.0 10 1

Sort (cost=139,818.28..142,211.08 rows=957,120 width=32) (actual time=1,130.739..1,130.785 rows=10 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. 210.114 210.114 ↑ 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..210.114 rows=957,120 loops=1)

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

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.029..0.029 rows=1 loops=10)

  • 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=51
8. 2,845.660 2,858.350 ↑ 1.0 1 10

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

  • Buffers: shared hit=2,355
9. 12.690 12.690 ↑ 4.3 178 10

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.080..1.269 rows=178 loops=10)

  • 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: 0
  • Buffers: shared hit=2,355
Planning time : 18.844 ms
Execution time : 4,000.063 ms