explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eMeO : пп

Settings
# exclusive inclusive rows x rows loops node
1. 3.393 827.628 ↓ 13.0 600 1

Unique (cost=8,621.11..8,621.46 rows=46 width=44) (actual time=823.017..827.628 rows=600 loops=1)

2. 57.708 824.235 ↓ 187.7 8,632 1

Sort (cost=8,621.11..8,621.23 rows=46 width=44) (actual time=823.012..824.235 rows=8,632 loops=1)

  • Sort Key: (count(r.inventory_id) OVER (?)) DESC, ((((cu.first_name)::text || ' '::text) || (cu.last_name)::text))
  • Sort Method: quicksort Memory: 1,058kB
3. 38.339 766.527 ↓ 187.7 8,632 1

WindowAgg (cost=8,618.81..8,619.84 rows=46 width=44) (actual time=722.235..766.527 rows=8,632 loops=1)

4. 43.969 728.188 ↓ 187.7 8,632 1

Sort (cost=8,618.81..8,618.92 rows=46 width=21) (actual time=722.168..728.188 rows=8,632 loops=1)

  • Sort Key: cu.customer_id
  • Sort Method: quicksort Memory: 1,057kB
5. 397.406 684.219 ↓ 187.7 8,632 1

Nested Loop Left Join (cost=8,211.35..8,617.54 rows=46 width=21) (actual time=54.878..684.219 rows=8,632 loops=1)

6. 36.045 96.909 ↓ 187.7 8,632 1

Hash Right Join (cost=8,211.07..8,603.94 rows=46 width=6) (actual time=54.838..96.909 rows=8,632 loops=1)

  • Hash Cond: (r.inventory_id = inv.inventory_id)
7. 6.156 6.156 ↑ 1.1 16,044 1

Seq Scan on rental r (cost=0.00..329.07 rows=17,007 width=6) (actual time=0.069..6.156 rows=16,044 loops=1)

8. 3.674 54.708 ↓ 54.2 2,494 1

Hash (cost=8,210.50..8,210.50 rows=46 width=4) (actual time=54.708..54.708 rows=2,494 loops=1)

  • Buckets: 4,096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 120kB
9. 6.917 51.034 ↓ 54.2 2,494 1

Subquery Scan on inv (cost=76.50..8,210.50 rows=46 width=4) (actual time=2.517..51.034 rows=2,494 loops=1)

  • Filter: (inv.sf_string ~~ '%Behind the Scenes%'::text)
  • Rows Removed by Filter: 7,274
10. 30.234 44.117 ↑ 46.9 9,768 1

ProjectSet (cost=76.50..2,484.25 rows=458,100 width=710) (actual time=2.507..44.117 rows=9,768 loops=1)

11. 9.543 13.883 ↓ 1.0 4,623 1

Hash Full Join (cost=76.50..159.39 rows=4,581 width=63) (actual time=2.389..13.883 rows=4,623 loops=1)

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

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

13. 0.817 1.835 ↑ 1.0 1,000 1

Hash (cost=64.00..64.00 rows=1,000 width=63) (actual time=1.835..1.835 rows=1,000 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 104kB
14. 1.018 1.018 ↑ 1.0 1,000 1

Seq Scan on film f (cost=0.00..64.00 rows=1,000 width=63) (actual time=0.069..1.018 rows=1,000 loops=1)

15. 189.904 189.904 ↑ 1.0 1 8,632

Index Scan using customer_pkey on customer cu (cost=0.28..0.30 rows=1 width=17) (actual time=0.022..0.022 rows=1 loops=8,632)

  • Index Cond: (r.customer_id = customer_id)
Planning time : 4.454 ms
Execution time : 829.023 ms