explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gWQL

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

Unique (cost=386.40..386.41 rows=1 width=8) (actual time=0.547..0.548 rows=1 loops=1)

2. 0.011 0.547 ↑ 1.0 1 1

Sort (cost=386.40..386.41 rows=1 width=8) (actual time=0.546..0.547 rows=1 loops=1)

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

Aggregate (cost=386.38..386.39 rows=1 width=8) (actual time=0.536..0.536 rows=1 loops=1)

4. 0.001 0.524 ↓ 0.0 0 1

Nested Loop (cost=96.36..386.33 rows=19 width=8) (actual time=0.524..0.524 rows=0 loops=1)

5. 0.007 0.523 ↓ 0.0 0 1

Nested Loop (cost=96.08..227.94 rows=18 width=64) (actual time=0.523..0.523 rows=0 loops=1)

6. 0.044 0.044 ↓ 2.0 2 1

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

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

Bitmap Heap Scan on product product0_ (cost=96.08..226.19 rows=19 width=72) (actual time=0.236..0.236 rows=0 loops=2)

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

BitmapAnd (cost=96.08..96.08 rows=41 width=0) (actual time=0.232..0.232 rows=0 loops=2)

9. 0.062 0.062 ↑ 3.8 70 2

Bitmap Index Scan on product_manufacturer_idx (cost=0.00..14.26 rows=263 width=0) (actual time=0.031..0.031 rows=70 loops=2)

  • Index Cond: (manufacturer_id = manufactur2_.id)
10. 0.391 0.391 ↑ 1.0 1,744 1

Bitmap Index Scan on product_distributor_idx (cost=0.00..81.36 rows=1,744 width=0) (actual time=0.391..0.391 rows=1,744 loops=1)

  • Index Cond: (distributor_id = 1)
11. 0.000 0.000 ↓ 0.0 0

Index Scan using product_product_detail_idx on product_detail productdet1_ (cost=0.29..8.79 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 : 1.218 ms
Execution time : 0.701 ms