explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jHCj

Settings
# exclusive inclusive rows x rows loops node
1. 13.047 10,934.825 ↑ 1.9 139 1

Group (cost=1,322,938.68..1,323,145.23 rows=270 width=99) (actual time=10,921.993..10,934.825 rows=139 loops=1)

  • Group Key: me.subnet, me.contact_role_id, subnet_exceptions.ip, subnet_exceptions.contact_role_id, subnet_exceptions.request_contact_role_id
2. 0.226 10,921.778 ↑ 1.9 139 1

Sort (cost=1,322,938.68..1,322,939.35 rows=270 width=65) (actual time=10,921.758..10,921.778 rows=139 loops=1)

  • Sort Key: me.subnet, me.contact_role_id, subnet_exceptions.ip, subnet_exceptions.contact_role_id, subnet_exceptions.request_contact_role_id
  • Sort Method: quicksort Memory: 35kB
3. 8,116.114 10,921.552 ↑ 1.9 139 1

Nested Loop Left Join (cost=0.00..1,322,927.77 rows=270 width=65) (actual time=28.788..10,921.552 rows=139 loops=1)

  • Join Filter: (((subnet_exceptions.ip)::ipaddress)::iprange << (me.subnet)::iprange)
  • Rows Removed by Join Filter: 44071407
  • Filter: ((me.contact_role_id = 'e2a72665-832a-45c5-a688-29927b7cf11b'::uuid) OR (subnet_exceptions.contact_role_id = 'e2a72665-832a-45c5-a688-29927b7cf11b'::uuid) OR (subnet_exceptions.request_contact_role_id = 'e2a72665-832a-45c5-a688-29927b7cf11b'::uuid))
  • Rows Removed by Filter: 16364
4. 1.763 1.763 ↑ 1.0 3,031 1

Seq Scan on claimedsubnets me (cost=0.00..57.11 rows=3,031 width=26) (actual time=0.011..1.763 rows=3,031 loops=1)

  • Filter: (z_subnet_check_ts IS NULL)
5. 2,800.961 2,803.675 ↑ 1.0 14,545 3,031

Materialize (cost=0.00..330.18 rows=14,545 width=39) (actual time=0.000..0.925 rows=14,545 loops=3,031)

6. 2.714 2.714 ↑ 1.0 14,545 1

Seq Scan on claimedsubnets_exceptions subnet_exceptions (cost=0.00..257.45 rows=14,545 width=39) (actual time=0.005..2.714 rows=14,545 loops=1)

Planning time : 0.264 ms
Execution time : 10,934.975 ms