explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fxWw : Optimization for: Evaluate and Select; plan #9dE

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.058 12.556 ↑ 1.0 1 1

Hash Anti Join (cost=1,097.95..1,097.99 rows=1 width=4) (actual time=12.553..12.556 rows=1 loops=1)

  • Output: ztcf.cloudfolderid
  • Hash Cond: (ztcf.cloudfolderid = ztcf_1.cloudfolderid)
2. 0.002 2.207 ↑ 2.0 1 1

Unique (cost=394.59..394.60 rows=2 width=4) (actual time=2.206..2.207 rows=1 loops=1)

  • Output: ztcf.cloudfolderid
3. 0.040 2.205 ↑ 2.0 1 1

Sort (cost=394.59..394.59 rows=2 width=4) (actual time=2.204..2.205 rows=1 loops=1)

  • Output: ztcf.cloudfolderid
  • Sort Key: ztcf.cloudfolderid
  • Sort Method: quicksort Memory: 25kB
4. 0.080 2.165 ↑ 2.0 1 1

Nested Loop (cost=0.85..394.58 rows=2 width=4) (actual time=0.193..2.165 rows=1 loops=1)

  • Output: ztcf.cloudfolderid
5. 0.177 0.177 ↓ 1.3 106 1

Index Scan using deviceid_index on public.device_to_zone_edge dtz (cost=0.43..78.18 rows=79 width=8) (actual time=0.058..0.177 rows=106 loops=1)

  • Output: dtz.deviceid, dtz.zoneid, dtz.version
  • Index Cond: (dtz.deviceid = 1,234)
6. 1.908 1.908 ↓ 0.0 0 106

Index Only Scan using zone_to_cloudfolder_edge_index1 on public.zone_to_cloudfolder_edge ztcf (cost=0.42..3.67 rows=33 width=12) (actual time=0.018..0.018 rows=0 loops=106)

  • Output: ztcf.zoneid, ztcf.version, ztcf.cloudfolderid
  • Index Cond: (ztcf.zoneid = dtz.zoneid)
  • Filter: ((dtz.version > 2100012) OR (ztcf.version > 2100012))
  • Rows Removed by Filter: 100
  • Heap Fetches: 5
7. 1.989 10.291 ↓ 1.3 10,600 1

Hash (cost=605.01..605.01 rows=7,869 width=4) (actual time=10.291..10.291 rows=10,600 loops=1)

  • Output: ztcf_1.cloudfolderid
  • Buckets: 16,384 (originally 8192) Batches: 1 (originally 1) Memory Usage: 501kB
8. 5.131 8.302 ↓ 1.3 10,600 1

HashAggregate (cost=447.63..526.32 rows=7,869 width=4) (actual time=6.157..8.302 rows=10,600 loops=1)

  • Output: ztcf_1.cloudfolderid
  • Group Key: ztcf_1.cloudfolderid
9. 1.094 3.171 ↓ 1.3 10,603 1

Nested Loop (cost=0.85..427.95 rows=7,869 width=4) (actual time=0.038..3.171 rows=10,603 loops=1)

  • Output: ztcf_1.cloudfolderid
10. 0.169 0.169 ↓ 1.3 106 1

Index Scan using deviceid_index on public.device_to_zone_edge dtz_1 (cost=0.43..78.38 rows=79 width=4) (actual time=0.018..0.169 rows=106 loops=1)

  • Output: dtz_1.deviceid, dtz_1.zoneid, dtz_1.version
  • Index Cond: (dtz_1.deviceid = 1,234)
  • Filter: (dtz_1.version <= 2,100,012)
11. 1.908 1.908 ↑ 1.0 100 106

Index Only Scan using zone_to_cloudfolder_edge_index1 on public.zone_to_cloudfolder_edge ztcf_1 (cost=0.42..3.42 rows=100 width=8) (actual time=0.007..0.018 rows=100 loops=106)

  • Output: ztcf_1.zoneid, ztcf_1.version, ztcf_1.cloudfolderid
  • Index Cond: ((ztcf_1.zoneid = dtz_1.zoneid) AND (ztcf_1.version <= 2,100,012))
  • Heap Fetches: 4