explain.depesz.com

PostgreSQL's explain analyze made readable

Result: es1E

Settings
# exclusive inclusive rows x rows loops node
1. 0.270 257.338 ↓ 2.9 50 1

Subquery Scan on q (cost=4,968.81..4,969.56 rows=17 width=48) (actual time=257.048..257.338 rows=50 loops=1)

  • Filter: pg_try_advisory_lock(q.inboxid)
2. 0.030 257.068 ↑ 1.0 50 1

Limit (cost=4,968.81..4,968.93 rows=50 width=56) (actual time=257.022..257.068 rows=50 loops=1)

3. 30.437 257.038 ↑ 5.7 50 1

Sort (cost=4,968.81..4,969.52 rows=285 width=56) (actual time=257.020..257.038 rows=50 loops=1)

  • Sort Key: (row_number() OVER (?)), inbox.inboxtenantid
  • Sort Method: top-N heapsort Memory: 32kB
4. 56.997 226.601 ↓ 304.9 86,883 1

WindowAgg (cost=4,953.64..4,959.34 rows=285 width=56) (actual time=143.012..226.601 rows=86,883 loops=1)

5. 78.040 169.604 ↓ 304.9 86,883 1

Sort (cost=4,953.64..4,954.35 rows=285 width=48) (actual time=143.002..169.604 rows=86,883 loops=1)

  • Sort Key: inbox.inboxtenantid
  • Sort Method: external sort Disk: 5,944kB
6. 90.940 91.564 ↓ 304.9 86,883 1

Seq Scan on inbox (cost=12.51..4,942.02 rows=285 width=48) (actual time=0.685..91.564 rows=86,883 loops=1)

  • Filter: ((inboxwasprocessed = 1) AND (NOT (hashed SubPlan 1)) AND (upper((inboxtenantid)::text) = 'GFCDEVQACSIX_TST'::text))
  • Rows Removed by Filter: 27,495
7.          

SubPlan (for Seq Scan)

8. 0.624 0.624 ↓ 0.0 0 1

Function Scan on pg_lock_status l (cost=0.00..12.50 rows=5 width=4) (actual time=0.623..0.624 rows=0 loops=1)

  • Filter: (locktype = 'advisory'::text)
  • Rows Removed by Filter: 5