explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rc2P

Settings
# exclusive inclusive rows x rows loops node
1. 21.435 21.435 ↓ 50.9 7,635 1

Sort (cost=3462.64..3467.62 rows=1992 width=12) (actual time=1050.563..1050.565 rows=10 loops=1)Sort Key: (count(pv.id)) DESCSort Method: top-N heapsort Memory: 25kB-> HashAggregate (cost=3399.67..3419.59 rows=1992 width=12) (actual time=1050.214..1050.401 rows=512 loops=1)Group Key: products.business_id-> Nested Loop (cost=1.14..3389.71 rows=1992 width=12) (actual time=0.499..863.925 rows=575424 loops=1)-> Nested Loop (cost=0.70..2905.29 rows=96 width=8) (actual time=0.492..134.363 rows=21611 loops=1)-> Nested Loop (cost=0.29..2736.35 rows=67 width=8) (actual time=0.136..46.514 rows=4211 loops=1)-> Seq Scan on users (cost=0.00..1,746.60 rows=150 width=4) (actual time=0.026..21.435 rows=7,635 loops=1)

Planning time : 0.853 ms
Execution time : 1,050.669 ms