explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uVdV

Settings
# exclusive inclusive rows x rows loops node
1. 344.589 3,122.584 ↓ 0.0 0 1

Merge Anti Join (cost=182,396.24..267,160.24 rows=898,600 width=8) (actual time=3,122.584..3,122.584 rows=0 loops=1)

  • Merge Cond: ((pd.device_id = t.device_id) AND (pd.user_id = t.user_id))
2. 946.211 946.211 ↑ 1.0 1,198,134 1

Index Only Scan using ix_permissions_device_explicit on permissions_device pd (cost=0.43..57,032.23 rows=1,198,134 width=8) (actual time=0.015..946.211 rows=1,198,134 loops=1)

  • Heap Fetches: 1198134
3. 105.613 1,831.784 ↑ 1.1 1,266,047 1

Materialize (cost=182,395.81..189,376.69 rows=1,396,176 width=8) (actual time=1,135.388..1,831.784 rows=1,266,047 loops=1)

4. 1,554.362 1,726.171 ↑ 1.1 1,266,047 1

Sort (cost=182,395.81..185,886.25 rows=1,396,176 width=8) (actual time=1,135.386..1,726.171 rows=1,266,047 loops=1)

  • Sort Key: t.device_id, t.user_id
  • Sort Method: external merge Disk: 22216kB
5. 171.809 171.809 ↑ 1.1 1,266,048 1

Seq Scan on tmp_user_device t (cost=0.00..20,805.76 rows=1,396,176 width=8) (actual time=0.018..171.809 rows=1,266,048 loops=1)