explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uxex

Settings
# exclusive inclusive rows x rows loops node
1. 0.072 38.322 ↓ 100.0 100 1

Unique (cost=2,184.10..2,184.11 rows=1 width=13) (actual time=38.231..38.322 rows=100 loops=1)

2. 0.142 38.250 ↓ 300.0 300 1

Sort (cost=2,184.10..2,184.11 rows=1 width=13) (actual time=38.230..38.250 rows=300 loops=1)

  • Sort Key: person_1._id, person_1.name
  • Sort Method: quicksort Memory: 39kB
3. 1.857 38.108 ↓ 300.0 300 1

Hash Join (cost=1,991.58..2,184.09 rows=1 width=13) (actual time=35.188..38.108 rows=300 loops=1)

  • Hash Cond: (person._id = friendship.person__id)
4. 1.145 1.145 ↑ 1.0 10,000 1

Seq Scan on person (cost=0.00..155.00 rows=10,000 width=8) (actual time=0.039..1.145 rows=10,000 loops=1)

5. 0.153 35.106 ↓ 100.0 300 1

Hash (cost=1,991.54..1,991.54 rows=3 width=21) (actual time=35.106..35.106 rows=300 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 24kB
6. 18.710 34.953 ↓ 100.0 300 1

Hash Join (cost=180.01..1,991.54 rows=3 width=21) (actual time=5.035..34.953 rows=300 loops=1)

  • Hash Cond: (friendship.friends__id = person_1._id)
7. 11.263 11.263 ↑ 1.0 90,000 1

Seq Scan on friendship (cost=0.00..1,474.00 rows=90,000 width=16) (actual time=0.021..11.263 rows=90,000 loops=1)

8. 0.058 4.980 ↓ 100.0 100 1

Hash (cost=180.00..180.00 rows=1 width=13) (actual time=4.980..4.980 rows=100 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
9. 4.922 4.922 ↓ 100.0 100 1

Seq Scan on person person_1 (cost=0.00..180.00 rows=1 width=13) (actual time=0.087..4.922 rows=100 loops=1)

  • Filter: ((name)::text ~~ '%55'::text)
  • Rows Removed by Filter: 9900