explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5quM

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 628.311 ↑ 1.0 1 1

Limit (cost=92,169.27..92,169.27 rows=1 width=55) (actual time=628.306..628.311 rows=1 loops=1)

  • Buffers: shared hit=20572
2. 27.792 628.305 ↑ 506,306.0 1 1

Sort (cost=92,169.27..93,435.03 rows=506,306 width=55) (actual time=628.304..628.305 rows=1 loops=1)

  • Sort Key: ((ip.ip)::inet)
  • Sort Method: top-N heapsort Memory: 25kB
  • Buffers: shared hit=20572
3. 45.092 600.513 ↑ 5.9 85,108 1

Nested Loop (cost=11,261.34..89,637.74 rows=506,306 width=55) (actual time=41.319..600.513 rows=85,108 loops=1)

  • Buffers: shared hit=20567
4. 0.010 0.010 ↑ 1.0 1 1

Seq Scan on conrepo_apn apn (cost=0.00..1.16 rows=1 width=8) (actual time=0.004..0.010 rows=1 loops=1)

  • Filter: (enabled AND (id = 5))
  • Rows Removed by Filter: 12
  • Buffers: shared hit=1
5. 275.168 555.411 ↑ 5.9 85,108 1

Hash Join (cost=11,261.34..82,041.99 rows=506,306 width=31) (actual time=41.301..555.411 rows=85,108 loops=1)

  • Hash Cond: (ip.cidrid = cidr.id)
  • Buffers: shared hit=20566
6. 242.806 280.225 ↑ 1.3 1,069,672 1

Bitmap Heap Scan on conrepo_apnip ip (cost=11,259.56..78,190.79 rows=1,340,223 width=31) (actual time=39.914..280.225 rows=1,069,672 loops=1)

  • Recheck Cond: ((NOT reserved) AND (NOT allocated))
  • Heap Blocks: exact=16442
  • Buffers: shared hit=20562
7. 37.419 37.419 ↑ 1.2 1,074,200 1

Bitmap Index Scan on x_conrepo_apnip_cidridresall (cost=0.00..10,924.50 rows=1,340,223 width=0) (actual time=37.419..37.419 rows=1,074,200 loops=1)

  • Buffers: shared hit=4120
8. 0.008 0.018 ↑ 1.0 17 1

Hash (cost=1.56..1.56 rows=17 width=16) (actual time=0.018..0.018 rows=17 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
9. 0.010 0.010 ↑ 1.0 17 1

Seq Scan on conrepo_apncidr cidr (cost=0.00..1.56 rows=17 width=16) (actual time=0.004..0.010 rows=17 loops=1)

  • Filter: (enabled AND (apnid = 5))
  • Rows Removed by Filter: 28
  • Buffers: shared hit=1