explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iRbJ

Settings
# exclusive inclusive rows x rows loops node
1. 60.809 1,123.799 ↑ 27.4 14,689 1

Unique (cost=61,132.18..68,165.53 rows=401,906 width=28) (actual time=973.102..1,123.799 rows=14,689 loops=1)

2. 532.458 1,062.990 ↑ 2.3 172,202 1

Sort (cost=61,132.18..62,136.94 rows=401,906 width=28) (actual time=973.101..1,062.990 rows=172,202 loops=1)

  • Sort Key: r.id, t.shape_id, r.agency_id, r.type, r.short_name, r.feed_id
  • Sort Method: external merge Disk: 6,936kB
3. 111.211 530.532 ↑ 2.3 172,202 1

Hash Join (cost=842.81..14,103.76 rows=401,906 width=28) (actual time=16.752..530.532 rows=172,202 loops=1)

  • Hash Cond: ((t.feed_id = sl.feed_id) AND (t.shape_id = sl.id))
4. 232.448 404.677 ↑ 1.0 401,906 1

Hash Join (cost=115.33..11,266.21 rows=401,906 width=32) (actual time=2.060..404.677 rows=401,906 loops=1)

  • Hash Cond: ((t.route_id = r.id) AND (t.feed_id = r.feed_id))
5. 170.725 170.725 ↑ 1.0 401,906 1

Seq Scan on trip t (cost=0.00..9,040.06 rows=401,906 width=20) (actual time=0.544..170.725 rows=401,906 loops=1)

6. 0.863 1.504 ↑ 1.0 3,093 1

Hash (cost=68.93..68.93 rows=3,093 width=23) (actual time=1.504..1.504 rows=3,093 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 203kB
7. 0.641 0.641 ↑ 1.0 3,093 1

Seq Scan on route r (cost=0.00..68.93 rows=3,093 width=23) (actual time=0.006..0.641 rows=3,093 loops=1)

8. 3.657 14.644 ↑ 1.0 14,240 1

Hash (cost=513.88..513.88 rows=14,240 width=9) (actual time=14.644..14.644 rows=14,240 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 736kB
9. 10.987 10.987 ↑ 1.0 14,240 1

Index Only Scan using shape_line_pkey on shape_line sl (cost=0.29..513.88 rows=14,240 width=9) (actual time=1.040..10.987 rows=14,240 loops=1)

  • Heap Fetches: 0
Planning time : 4.250 ms
Execution time : 1,126.096 ms