explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1e78

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.055 ↑ 1.0 1 1

Unique (cost=292.32..292.32 rows=1 width=8) (actual time=0.055..0.055 rows=1 loops=1)

2. 0.006 0.054 ↑ 1.0 1 1

Sort (cost=292.32..292.32 rows=1 width=8) (actual time=0.054..0.054 rows=1 loops=1)

  • Sort Key: (count(DISTINCT product0_.id))
  • Sort Method: quicksort Memory: 25kB
3. 0.006 0.048 ↑ 1.0 1 1

Aggregate (cost=292.30..292.31 rows=1 width=8) (actual time=0.048..0.048 rows=1 loops=1)

4. 0.001 0.042 ↓ 0.0 0 1

Nested Loop (cost=4.98..292.25 rows=19 width=8) (actual time=0.042..0.042 rows=0 loops=1)

5. 0.003 0.041 ↓ 0.0 0 1

Nested Loop (cost=4.69..133.66 rows=18 width=64) (actual time=0.041..0.041 rows=0 loops=1)

6. 0.012 0.012 ↓ 2.0 2 1

Seq Scan on manufacturer manufactur2_ (cost=0.00..1.56 rows=1 width=8) (actual time=0.010..0.012 rows=2 loops=1)

  • Filter: ((code)::text = 'SCJ'::text)
  • Rows Removed by Filter: 50
7. 0.002 0.026 ↓ 0.0 0 2

Bitmap Heap Scan on product product0_ (cost=4.69..131.92 rows=18 width=72) (actual time=0.013..0.013 rows=0 loops=2)

  • Recheck Cond: ((manufacturer_id = manufactur2_.id) AND (distributor_id = 1))
  • Filter: (enabled AND (NOT is_deleted))
8. 0.024 0.024 ↓ 0.0 0 2

Bitmap Index Scan on product_manufacturer_dist_idx (cost=0.00..4.69 rows=40 width=0) (actual time=0.012..0.012 rows=0 loops=2)

  • Index Cond: ((manufacturer_id = manufactur2_.id) AND (distributor_id = 1))
9. 0.000 0.000 ↓ 0.0 0

Index Scan using product_product_detail_idx on product_detail productdet1_ (cost=0.29..8.80 rows=1 width=20) (never executed)

  • Index Cond: (product_id = product0_.id)
  • Filter: (enabled AND (NOT is_deleted) AND ((lower((product0_.name)::text) ~~ '%%'::text) OR (lower((product0_.code)::text) ~~ '%%'::text) OR (lower((barcode)::text) ~~ '%%'::text)))
Planning time : 0.650 ms
Execution time : 0.121 ms