explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gPAD

Settings
# exclusive inclusive rows x rows loops node
1. 101.636 5,425.743 ↑ 1.0 1 1

Aggregate (cost=480,243.37..480,243.38 rows=1 width=8) (actual time=5,425.743..5,425.743 rows=1 loops=1)

2. 998.747 5,324.107 ↓ 1.0 1,793,996 1

Sort (cost=453,343.59..457,826.89 rows=1,793,319 width=209) (actual time=5,194.046..5,324.107 rows=1,793,996 loops=1)

  • Sort Key: det.priority DESC, r.created_date
  • Sort Method: quicksort Memory: 530943kB
3. 2,572.672 4,325.360 ↓ 1.0 1,793,996 1

HashAggregate (cost=249,136.56..267,069.75 rows=1,793,319 width=209) (actual time=3,327.065..4,325.360 rows=1,793,996 loops=1)

  • Group Key: r.tld_name, r.name, r.uname, r.created_date, r.restriction_id, r.password, det.priority, det.name, det.reason, det.active
4. 109.320 1,752.688 ↓ 1.0 1,793,996 1

Append (cost=21,254.77..204,303.58 rows=1,793,319 width=209) (actual time=215.331..1,752.688 rows=1,793,996 loops=1)

5. 534.164 1,641.473 ↓ 1.0 1,792,304 1

Hash Join (cost=21,254.77..186,271.98 rows=1,791,627 width=320) (actual time=215.329..1,641.473 rows=1,792,304 loops=1)

  • Hash Cond: (r.restriction_id = det.id)
6. 923.566 1,107.277 ↓ 1.0 1,792,304 1

Bitmap Heap Scan on restricted_domain r (cost=21,253.54..161,635.88 rows=1,791,627 width=57) (actual time=215.281..1,107.277 rows=1,792,304 loops=1)

  • Recheck Cond: (tld_name = 'com.ky'::text)
  • Heap Blocks: exact=117987
7. 183.711 183.711 ↓ 1.0 1,792,304 1

Bitmap Index Scan on restricted_domain_tld_name_idx (cost=0.00..20,805.64 rows=1,791,627 width=0) (actual time=183.710..183.711 rows=1,792,304 loops=1)

  • Index Cond: (tld_name = 'com.ky'::text)
8. 0.010 0.032 ↓ 1.5 15 1

Hash (cost=1.10..1.10 rows=10 width=267) (actual time=0.032..0.032 rows=15 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
9. 0.022 0.022 ↓ 1.5 15 1

Seq Scan on restriction_detail det (cost=0.00..1.10 rows=10 width=267) (actual time=0.012..0.022 rows=15 loops=1)

10. 1.619 1.895 ↑ 1.0 1,692 1

Hash Join (cost=2.39..98.41 rows=1,692 width=361) (actual time=0.081..1.895 rows=1,692 loops=1)

  • Hash Cond: (w.restriction_id = det_1.id)
11. 0.239 0.239 ↑ 1.0 1,692 1

Seq Scan on restricted_word w (cost=0.00..38.92 rows=1,692 width=38) (actual time=0.011..0.239 rows=1,692 loops=1)

12. 0.011 0.037 ↓ 1.5 15 1

Hash (cost=2.26..2.26 rows=10 width=273) (actual time=0.037..0.037 rows=15 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
13. 0.004 0.026 ↓ 1.5 15 1

Nested Loop (cost=0.00..2.26 rows=10 width=273) (actual time=0.022..0.026 rows=15 loops=1)

14. 0.013 0.013 ↑ 1.0 1 1

Seq Scan on tld t (cost=0.00..1.06 rows=1 width=6) (actual time=0.012..0.013 rows=1 loops=1)

  • Filter: (name = 'com.ky'::text)
  • Rows Removed by Filter: 4
15. 0.009 0.009 ↓ 1.5 15 1

Seq Scan on restriction_detail det_1 (cost=0.00..1.10 rows=10 width=267) (actual time=0.008..0.009 rows=15 loops=1)

Planning time : 0.755 ms
Execution time : 5,498.448 ms