explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hGuI

Settings
# exclusive inclusive rows x rows loops node
1. 471.835 79,745.540 ↑ 1.0 1 1

Aggregate (cost=6,423,390.75..6,423,390.76 rows=1 width=8) (actual time=79,745.540..79,745.540 rows=1 loops=1)

2. 14,112.475 79,273.705 ↑ 1.0 8,969,886 1

Sort (cost=6,288,802.20..6,311,233.63 rows=8,972,570 width=209) (actual time=76,728.159..79,273.705 rows=8,969,886 loops=1)

  • Sort Key: det.priority DESC, r.created_date
  • Sort Method: external merge Disk: 1461512kB
3. 2,690.096 65,161.230 ↑ 1.0 8,969,886 1

Unique (cost=3,231,489.50..3,478,235.18 rows=8,972,570 width=209) (actual time=51,887.400..65,161.230 rows=8,969,886 loops=1)

4. 58,693.496 62,471.134 ↑ 1.0 8,969,886 1

Sort (cost=3,231,489.50..3,253,920.93 rows=8,972,570 width=209) (actual time=51,887.399..62,471.134 rows=8,969,886 loops=1)

  • Sort Key: r.tld_name, r.name, r.uname, r.created_date, r.restriction_id, r.password, det.priority, det.name, det.reason, det.active
  • Sort Method: external merge Disk: 1461536kB
5. 498.803 3,777.638 ↑ 1.0 8,969,886 1

Append (cost=1.23..420,922.47 rows=8,972,570 width=209) (actual time=0.053..3,777.638 rows=8,969,886 loops=1)

6. 2,354.575 3,272.287 ↑ 1.0 8,961,426 1

Hash Join (cost=1.23..330,885.84 rows=8,964,110 width=320) (actual time=0.053..3,272.287 rows=8,961,426 loops=1)

  • Hash Cond: (r.restriction_id = det.id)
7. 917.684 917.684 ↑ 1.0 8,961,426 1

Seq Scan on restricted_domain r (cost=0.00..207,628.10 rows=8,964,110 width=57) (actual time=0.013..917.684 rows=8,961,426 loops=1)

8. 0.012 0.028 ↓ 1.5 15 1

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

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

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

10. 6.326 6.548 ↑ 1.0 8,460 1

Hash Join (cost=3.41..310.94 rows=8,460 width=361) (actual time=0.087..6.548 rows=8,460 loops=1)

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

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

12. 0.015 0.055 ↓ 1.5 75 1

Hash (cost=2.79..2.79 rows=50 width=273) (actual time=0.055..0.055 rows=75 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 27kB
13. 0.018 0.040 ↓ 1.5 75 1

Nested Loop (cost=0.00..2.79 rows=50 width=273) (actual time=0.016..0.040 rows=75 loops=1)

14. 0.007 0.007 ↓ 1.5 15 1

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

15. 0.010 0.015 ↑ 1.0 5 15

Materialize (cost=0.00..1.07 rows=5 width=6) (actual time=0.001..0.001 rows=5 loops=15)

16. 0.005 0.005 ↑ 1.0 5 1

Seq Scan on tld t (cost=0.00..1.05 rows=5 width=6) (actual time=0.004..0.005 rows=5 loops=1)

Planning time : 0.668 ms
Execution time : 80,215.325 ms