explain.depesz.com

PostgreSQL's explain analyze made readable

Result: um7r

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 99,780.981 ↓ 0.0 0 1

HashAggregate (cost=588,637.63..588,637.64 rows=1 width=9) (actual time=99,780.981..99,780.981 rows=0 loops=1)

  • Group Key: package.id, package.cod
2.          

Initplan (forHashAggregate)

3. 0.000 0.000 ↓ 0.0 0

Index Scan using tpl_name_unique_idx on contact (cost=0.14..8.16 rows=1 width=4) (never executed)

  • Index Cond: ((name)::text = 'lex'::text)
4. 0.000 99,780.980 ↓ 0.0 0 1

Nested Loop (cost=17,180.28..588,629.45 rows=4 width=9) (actual time=99,780.980..99,780.980 rows=0 loops=1)

  • Join Filter: (package.id = task.package_id)
5. 0.001 99,780.980 ↓ 0.0 0 1

Nested Loop (cost=17,179.71..588,514.65 rows=1 width=13) (actual time=99,780.980..99,780.980 rows=0 loops=1)

6. 99,591.836 99,780.979 ↓ 0.0 0 1

Bitmap Heap Scan on package (cost=17,179.28..588,506.19 rows=1 width=9) (actual time=99,780.979..99,780.979 rows=0 loops=1)

  • Recheck Cond: ((status)::text = 'waiting_for_pickup'::text)
  • Filter: ((rounded_cod IS NULL) AND (cod > 0.0))
  • Rows Removed by Filter: 660368
  • Heap Blocks: exact=217768
7. 189.143 189.143 ↓ 1.0 660,376 1

Bitmap Index Scan on package_status_idx (cost=0.00..17,179.28 rows=652,629 width=0) (actual time=189.143..189.143 rows=660,376 loops=1)

  • Index Cond: ((status)::text = 'waiting_for_pickup'::text)
8. 0.000 0.000 ↓ 0.0 0

Index Scan using uniq_b1e5ed5bf44cabff on logistics_request (cost=0.43..8.45 rows=1 width=4) (never executed)

  • Index Cond: (package_id = package.id)
  • Filter: (delivery_tpl_id = $0)
9. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_527edb25f44cabff on task (cost=0.57..113.70 rows=88 width=4) (never executed)

  • Index Cond: (package_id = logistics_request.package_id)
  • Filter: (direction = 'to_customer'::text)
Planning time : 0.881 ms
Execution time : 99,781.821 ms