explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yny9

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 8.609 ↑ 1.0 1 1

HashAggregate (cost=1,048.78..1,048.79 rows=1 width=8) (actual time=8.609..8.609 rows=1 loops=1)

  • Group Key: count(DISTINCT product0_.id)
2. 0.294 8.605 ↑ 1.0 1 1

Aggregate (cost=1,048.77..1,048.78 rows=1 width=8) (actual time=8.605..8.605 rows=1 loops=1)

3. 3.554 8.311 ↓ 11.7 1,148 1

Hash Join (cost=377.07..1,048.53 rows=98 width=8) (actual time=1.286..8.311 rows=1,148 loops=1)

  • Hash Cond: (productdet1_.product_id = product0_.id)
4. 3.533 3.533 ↓ 1.3 15,097 1

Seq Scan on product_detail productdet1_ (cost=0.00..625.99 rows=11,865 width=8) (actual time=0.007..3.533 rows=15,097 loops=1)

  • Filter: (enabled AND (NOT is_deleted))
  • Rows Removed by Filter: 7002
5. 0.081 1.224 ↓ 6.2 574 1

Hash (cost=375.92..375.92 rows=92 width=8) (actual time=1.224..1.224 rows=574 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 31kB
6. 0.413 1.143 ↓ 6.2 574 1

Hash Join (cost=39.25..375.92 rows=92 width=8) (actual time=0.202..1.143 rows=574 loops=1)

  • Hash Cond: (product0_.manufacturer_id = manufactur2_.id)
7. 0.556 0.711 ↓ 1.6 1,312 1

Bitmap Heap Scan on product product0_ (cost=37.54..370.30 rows=796 width=16) (actual time=0.178..0.711 rows=1,312 loops=1)

  • Recheck Cond: (distributor_id = 1)
  • Filter: (enabled AND (NOT is_deleted))
  • Rows Removed by Filter: 429
  • Heap Blocks: exact=153
8. 0.155 0.155 ↑ 1.0 1,741 1

Bitmap Index Scan on product_distributor_idx (cost=0.00..37.34 rows=1,741 width=0) (actual time=0.155..0.155 rows=1,741 loops=1)

  • Index Cond: (distributor_id = 1)
9. 0.004 0.019 ↑ 1.0 6 1

Hash (cost=1.64..1.64 rows=6 width=8) (actual time=0.019..0.019 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.015 0.015 ↑ 1.0 6 1

Seq Scan on manufacturer manufactur2_ (cost=0.00..1.64 rows=6 width=8) (actual time=0.006..0.015 rows=6 loops=1)

  • Filter: ((code)::text = 'PG'::text)
  • Rows Removed by Filter: 45
Planning time : 0.414 ms
Execution time : 8.688 ms