explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RXYn

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

HashAggregate (cost=623.09..623.10 rows=1 width=8) (actual time=3.416..3.416 rows=1 loops=1)

  • Group Key: count(DISTINCT product0_.id)
2. 0.305 3.412 ↑ 1.0 1 1

Aggregate (cost=623.08..623.09 rows=1 width=8) (actual time=3.412..3.412 rows=1 loops=1)

3. 0.174 3.107 ↓ 11.7 1,148 1

Nested Loop (cost=39.54..622.83 rows=98 width=8) (actual time=0.211..3.107 rows=1,148 loops=1)

4. 0.454 1.211 ↓ 6.2 574 1

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

  • Hash Cond: (product0_.manufacturer_id = manufactur2_.id)
5. 0.583 0.736 ↓ 1.6 1,312 1

Bitmap Heap Scan on product product0_ (cost=37.54..370.30 rows=796 width=16) (actual time=0.177..0.736 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
6. 0.153 0.153 ↑ 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.153..0.153 rows=1,741 loops=1)

  • Index Cond: (distributor_id = 1)
7. 0.004 0.021 ↑ 1.0 6 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 0.017 0.017 ↑ 1.0 6 1

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

  • Filter: ((code)::text = 'PG'::text)
  • Rows Removed by Filter: 45
9. 1.722 1.722 ↓ 2.0 2 574

Index Scan using product_details_product_idx on product_detail productdet1_ (cost=0.29..2.67 rows=1 width=8) (actual time=0.002..0.003 rows=2 loops=574)

  • Index Cond: (product_id = product0_.id)
  • Filter: (enabled AND (NOT is_deleted))
Planning time : 0.672 ms
Execution time : 3.494 ms