explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JXgJ

Settings
# exclusive inclusive rows x rows loops node
1. 0.015 172.609 ↑ 1.0 80 1

Limit (cost=6,460.31..6,460.51 rows=80 width=17) (actual time=172.591..172.609 rows=80 loops=1)

2. 0.393 172.594 ↑ 30.2 80 1

Sort (cost=6,460.31..6,466.36 rows=2,420 width=17) (actual time=172.589..172.594 rows=80 loops=1)

  • Sort Key: stock_picking__location_id.parent_left, stock_picking__stock_journal_id.id, stock_picking.state
  • Sort Method: top-N heapsort Memory: 29kB
3. 0.141 172.201 ↑ 8.4 288 1

Hash Left Join (cost=195.37..6,371.71 rows=2,420 width=17) (actual time=168.568..172.201 rows=288 loops=1)

  • Hash Cond: (stock_picking.stock_journal_id = stock_picking__stock_journal_id.id)
4. 0.100 172.030 ↑ 8.4 288 1

Hash Left Join (cost=192.93..6,362.50 rows=2,420 width=17) (actual time=168.524..172.030 rows=288 loops=1)

  • Hash Cond: (stock_picking.location_id = stock_picking__location_id.id)
5. 3.572 171.633 ↑ 8.4 288 1

Bitmap Heap Scan on stock_picking (cost=173.12..6,336.34 rows=2,420 width=17) (actual time=168.202..171.633 rows=288 loops=1)

  • Recheck Cond: (((name)::text = '9'::text) OR ((origin)::text ~~ '29921%'::text))
  • Rows Removed by Index Recheck: 216
  • Filter: (((company_id IS NULL) OR (company_id = 1)) AND ((type)::text = 'internal'::text))
  • Rows Removed by Filter: 322
  • Heap Blocks: exact=798
6. 168.035 168.061 ↓ 0.0 0 1

BitmapOr (cost=173.12..173.12 rows=5,540 width=0) (actual time=168.061..168.061 rows=0 loops=1)

  • -> Bitmap Index Scan on trgm_idx_origin (cost=0.00..170.24 rows=5539 width=0) (actual time=168.032..168.032 rows=826 loops=
7. 0.026 0.026 ↓ 0.0 0 1

Bitmap Index Scan on stock_picking_name_uniq (cost=0.00..1.67 rows=1 width=0) (actual time=0.026..0.026 rows=0 loops=1)

  • Index Cond: ((name)::text = '9'::text)
  • Index Cond: ((origin)::text ~~ '29921%'::text)
8. 0.297 0.297 ↑ 1.0 347 1

Hash (cost=15.47..15.47 rows=347 width=8) (actual time=0.297..0.297 rows=347 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 22kB
  • -> Seq Scan on stock_location stock_picking__location_id (cost=0.00..15.47 rows=347 width=8) (actual time=0.022..0.255 rows=347 l
9. 0.030 0.030 ↑ 1.0 64 1

Hash (cost=1.64..1.64 rows=64 width=4) (actual time=0.030..0.030 rows=64 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
  • -> Seq Scan on stock_journal stock_picking__stock_journal_id (cost=0.00..1.64 rows=64 width=4) (actual time=0.011..0.021 rows=64 loops=
Planning time : 0.893 ms
Execution time : 172.736 ms