explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ClUv

Settings
# exclusive inclusive rows x rows loops node
1. 0.096 4,793.955 ↑ 46.0 9 1

Sort (cost=784,709.23..784,710.27 rows=414 width=169) (actual time=4,793.946..4,793.955 rows=9 loops=1)

  • Sort Key: a.date_parution, a.code_depot, a.id_commande
  • Sort Method: quicksort Memory: 27kB
2. 288.733 4,793.859 ↑ 46.0 9 1

Hash Anti Join (cost=368,429.32..784,691.24 rows=414 width=169) (actual time=4,688.913..4,793.859 rows=9 loops=1)

  • Hash Cond: (((a.code_editeur)::text = (b.code_editeur)::text) AND ((a.code_depot)::text = (b.code_depot)::text) AND (a.id_destinataire = b.id_destinataire) AND (a.date_parution = b.date_parution))
3. 30.484 1,545.184 ↓ 195.7 113,720 1

Gather (cost=1,000.00..415,389.47 rows=581 width=169) (actual time=425.461..1,545.184 rows=113,720 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 1,514.700 1,514.700 ↓ 156.6 37,907 3 / 3

Parallel Seq Scan on commande a (cost=0.00..414,331.38 rows=242 width=169) (actual time=416.174..1,514.700 rows=37,907 loops=3)

  • Filter: ((date_parution > '2020-01-12'::date) AND ((code_editeur)::text = 'CO'::text) AND ((code_titre)::text = 'CO'::text) AND ((statut_commande)::text = 'TO_DELIVER'::text) AND (date_part('dow'::text, (date_parution)::timestamp without time zone) = '6'::double precision))
  • Rows Removed by Filter: 4323353
5. 448.597 2,959.942 ↓ 6.1 366,322 1

Hash (cost=365,881.08..365,881.08 rows=59,862 width=19) (actual time=2,959.941..2,959.942 rows=366,322 loops=1)

  • Buckets: 32768 (originally 32768) Batches: 32 (originally 4) Memory Usage: 1055kB
6. 169.105 2,511.345 ↓ 6.1 366,322 1

Gather (cost=1,000.00..365,881.08 rows=59,862 width=19) (actual time=0.646..2,511.345 rows=366,322 loops=1)

  • Workers Planned: 2
  • Workers Launched: 1
7. 2,342.240 2,342.240 ↓ 7.3 183,161 2 / 2

Parallel Seq Scan on commande b (cost=0.00..358,894.88 rows=24,942 width=19) (actual time=0.246..2,342.240 rows=183,161 loops=2)

  • Filter: (((code_editeur)::text = 'CO'::text) AND ((code_titre)::text = 'TO'::text) AND ((statut_commande)::text = 'TO_DELIVER'::text))
  • Rows Removed by Filter: 6358729