explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yWfb

Settings
# exclusive inclusive rows x rows loops node
1. 1.790 85.201 ↑ 1.0 1,000 1

Limit (cost=110,836.92..110,953.59 rows=1,000 width=298) (actual time=76.200..85.201 rows=1,000 loops=1)

2. 11.189 83.411 ↑ 20.3 1,200 1

Gather Merge (cost=110,813.58..113,653.68 rows=24,342 width=298) (actual time=75.605..83.411 rows=1,200 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 2.704 72.222 ↑ 17.6 692 3 / 3

Sort (cost=109,813.56..109,843.99 rows=12,171 width=298) (actual time=71.560..72.222 rows=692 loops=3)

  • Sort Key: id_commande
  • Sort Method: quicksort Memory: 475kB
4. 63.694 69.518 ↑ 9.5 1,287 3 / 3

Parallel Bitmap Heap Scan on commande commande0_ (cost=2,448.13..107,987.29 rows=12,171 width=298) (actual time=22.585..69.518 rows=1,287 loops=3)

  • Recheck Cond: (((code_depot)::text = '269'::text) OR ((code_depot)::text = '236'::text) OR ((code_depot)::text = '171'::text))
  • Filter: (((code_origine)::text = ANY ('{ADV,PH}'::text[])) AND ((statut_commande)::text = 'TO_DELIVER'::text) AND ((statut_livraison)::text = 'TO_PREPARE'::text) AND ((((code_depot)::text = '269'::text) AND (date_livraison_preconisee >= '2020-11-01'::date) AND (date_livraison_preconisee <= '2020-11-01'::date)) OR (((code_depot)::text = '236'::text) AND (date_livraison_preconisee >= '2020-10-12'::date) AND (date_livraison_preconisee <= '2020-11-01'::date)) OR (((code_depot)::text = '171'::text) AND (date_livraison_preconisee >= '2020-07-24'::date) AND (date_livraison_preconisee <= '2020-10-10'::date))))
  • Rows Removed by Filter: 36,689
  • Heap Blocks: exact=8,931
5. 0.001 5.824 ↓ 0.0 0 1 / 3

BitmapOr (cost=2,448.13..2,448.13 rows=100,777 width=0) (actual time=17.470..17.471 rows=0 loops=1)

6. 2.446 2.446 ↑ 1.0 42,719 1 / 3

Bitmap Index Scan on u_commande (cost=0.00..1,031.70 rows=42,884 width=0) (actual time=7.338..7.339 rows=42,719 loops=1)

  • Index Cond: ((code_depot)::text = '269'::text)
7. 1.204 1.204 ↓ 2.1 22,902 1 / 3

Bitmap Index Scan on u_commande (cost=0.00..259.17 rows=10,721 width=0) (actual time=3.610..3.613 rows=22,902 loops=1)

  • Index Cond: ((code_depot)::text = '236'::text)
8. 2.172 2.172 ↓ 1.1 53,876 1 / 3

Bitmap Index Scan on u_commande (cost=0.00..1,135.36 rows=47,172 width=0) (actual time=6.515..6.516 rows=53,876 loops=1)

  • Index Cond: ((code_depot)::text = '171'::text)
Planning time : 0.271 ms