explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4xwX

Settings
# exclusive inclusive rows x rows loops node
1. 0.018 9,464.051 ↑ 1.0 80 1

Limit (cost=2,463,107.82..2,463,117.40 rows=80 width=30) (actual time=9,419.365..9,464.051 rows=80 loops=1)

2. 0.000 9,464.033 ↑ 191,582.5 80 1

Gather Merge (cost=2,463,107.82..4,298,232.76 rows=15,326,600 width=30) (actual time=9,419.361..9,464.033 rows=80 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
3. 8,957.965 46,516.185 ↑ 4,672.7 820 5

Sort (cost=2,458,107.76..2,467,686.88 rows=3,831,650 width=30) (actual time=9,302.969..9,303.237 rows=820 loops=5)

  • Sort Key: stock_picking__location_id.parent_left, stock_picking.user_done, stock_picking__stock_journal_id.id, stock_picking.state
  • Sort Method: external merge Disk: 62720kB
4. 3,610.575 37,558.220 ↑ 1.3 3,038,608 5

Hash Left Join (cost=22.25..1,985,430.10 rows=3,831,650 width=30) (actual time=0.530..7,511.644 rows=3,038,608 loops=5)

  • Hash Cond: (stock_picking.stock_journal_id = stock_picking__stock_journal_id.id)
5. 33,946.345 33,947.455 ↑ 1.3 3,038,608 5

Hash Left Join (cost=19.81..1,974,703.53 rows=3,831,650 width=30) (actual time=0.464..6,789.491 rows=3,038,608 loops=5)

  • Hash Cond: (stock_picking.location_id = stock_picking__location_id.id)
  • -> Parallel Seq Scan on stock_picking (cost=0.00..1964621.30 rows=3831650 width=30) (actual time=0.075..5957.815 rows=3038608 loo
  • Filter: (((company_id IS NULL) OR (company_id = 1)) AND ((type)::text = 'internal'::text) AND (((name)::text = '9'::text) OR
  • Rows Removed by Filter: 8127964
6. 1.110 1.110 ↑ 1.0 347 5

Hash (cost=15.47..15.47 rows=347 width=8) (actual time=0.222..0.222 rows=347 loops=5)

  • 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.019..0.156 rows
7. 0.190 0.190 ↑ 1.0 64 5

Hash (cost=1.64..1.64 rows=64 width=4) (actual time=0.038..0.038 rows=64 loops=5)

  • 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.018..0.025 rows=64
Planning time : 0.995 ms
Execution time : 9,490.665 ms