explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sRLC

Settings
# exclusive inclusive rows x rows loops node
1. 0.185 16.085 ↓ 1.0 600 1

Sort (cost=893.08..894.58 rows=599 width=44) (actual time=16.042..16.085 rows=600 loops=1)

  • Sort Key: c.customer_id
  • Sort Method: quicksort Memory: 71kB
2. 3.056 15.900 ↓ 1.0 600 1

HashAggregate (cost=857.96..865.45 rows=599 width=44) (actual time=15.471..15.900 rows=600 loops=1)

  • Group Key: c.customer_id
3. 2.382 12.844 ↑ 1.0 8,632 1

Hash Left Join (cost=239.15..814.79 rows=8,633 width=21) (actual time=2.975..12.844 rows=8,632 loops=1)

  • Hash Cond: (r.customer_id = c.customer_id)
4. 5.144 10.274 ↑ 1.0 8,632 1

Hash Right Join (cost=216.68..673.61 rows=8,633 width=6) (actual time=2.777..10.274 rows=8,632 loops=1)

  • Hash Cond: (r.inventory_id = i.inventory_id)
5. 2.374 2.374 ↑ 1.0 16,044 1

Seq Scan on rental r (cost=0.00..310.44 rows=16,044 width=6) (actual time=0.013..2.374 rows=16,044 loops=1)

6. 0.382 2.756 ↓ 1.0 2,494 1

Hash (cost=185.86..185.86 rows=2,465 width=8) (actual time=2.756..2.756 rows=2,494 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 130kB
7. 0.976 2.374 ↓ 1.0 2,494 1

Hash Right Join (cost=73.22..185.86 rows=2,465 width=8) (actual time=0.993..2.374 rows=2,494 loops=1)

  • Hash Cond: (i.film_id = f.film_id)
8. 0.429 0.429 ↑ 1.0 4,581 1

Seq Scan on inventory i (cost=0.00..70.81 rows=4,581 width=6) (actual time=0.016..0.429 rows=4,581 loops=1)

9. 0.075 0.969 ↑ 1.0 538 1

Hash (cost=66.50..66.50 rows=538 width=4) (actual time=0.969..0.969 rows=538 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 27kB
10. 0.894 0.894 ↑ 1.0 538 1

Seq Scan on film f (cost=0.00..66.50 rows=538 width=4) (actual time=0.023..0.894 rows=538 loops=1)

  • Filter: (special_features @> '{"Behind the Scenes"}'::text[])
  • Rows Removed by Filter: 462
11. 0.095 0.188 ↑ 1.0 599 1

Hash (cost=14.99..14.99 rows=599 width=17) (actual time=0.188..0.188 rows=599 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 39kB
12. 0.093 0.093 ↑ 1.0 599 1

Seq Scan on customer c (cost=0.00..14.99 rows=599 width=17) (actual time=0.006..0.093 rows=599 loops=1)

Planning time : 0.547 ms
Execution time : 16.194 ms