explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AjEf

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 162.993 ↑ 1.0 1 1

Unique (cost=56,717.27..56,717.28 rows=1 width=8) (actual time=162.992..162.993 rows=1 loops=1)

2. 0.009 162.991 ↑ 1.0 1 1

Sort (cost=56,717.27..56,717.28 rows=1 width=8) (actual time=162.991..162.991 rows=1 loops=1)

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

Aggregate (cost=56,717.25..56,717.26 rows=1 width=8) (actual time=162.982..162.982 rows=1 loops=1)

4. 0.021 162.969 ↓ 0.0 0 1

Hash Join (cost=228.16..56,717.21 rows=19 width=8) (actual time=162.969..162.969 rows=0 loops=1)

  • Hash Cond: (productdet1_.product_id = product0_.id)
  • Join Filter: ((lower((product0_.name)::text) ~~ '%%'::text) OR (lower((product0_.code)::text) ~~ '%%'::text) OR (lower((productdet1_.barcode)::text) ~~ '%%'::text))
5. 162.470 162.470 ↑ 12,294.0 1 1

Seq Scan on product_detail productdet1_ (cost=0.00..56,442.44 rows=12,294 width=20) (actual time=162.470..162.470 rows=1 loops=1)

  • Filter: (enabled AND (NOT is_deleted))
6. 0.001 0.478 ↓ 0.0 0 1

Hash (cost=227.94..227.94 rows=18 width=64) (actual time=0.478..0.478 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
7. 0.011 0.477 ↓ 0.0 0 1

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

8. 0.042 0.042 ↓ 2.0 2 1

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

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

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

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

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

11. 0.052 0.052 ↑ 3.8 70 2

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

  • Index Cond: (manufacturer_id = manufactur2_.id)
12. 0.353 0.353 ↑ 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.353..0.353 rows=1,744 loops=1)

  • Index Cond: (distributor_id = 1)
Planning time : 1.108 ms
Execution time : 163.133 ms