explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Jcjd

Settings
# exclusive inclusive rows x rows loops node
1. 114.778 3,195.623 ↓ 1.2 933 1

GroupAggregate (cost=245,921.78..245,999.35 rows=760 width=56) (actual time=2,922.824..3,195.623 rows=933 loops=1)

  • Group Key: rsf.rsf_eln_niveau_fam_nb_mod, rsf.rsf_eln_niveau_fam
2. 591.490 3,080.845 ↓ 232.2 1,158,340 1

Sort (cost=245,921.78..245,934.26 rows=4,989 width=20) (actual time=2,922.715..3,080.845 rows=1,158,340 loops=1)

  • Sort Key: rsf.rsf_eln_niveau_fam_nb_mod, rsf.rsf_eln_niveau_fam
  • Sort Method: external merge Disk: 29,576kB
3. 347.453 2,489.355 ↓ 232.2 1,158,340 1

Hash Left Join (cost=234,844.51..245,615.34 rows=4,989 width=20) (actual time=1,488.677..2,489.355 rows=1,158,340 loops=1)

  • Hash Cond: ((rsf.tir_num_tiers_tir = ms.store_id) AND ((fs.fst_modele_r3)::integer = ms.model_id))
4. 100.369 2,139.619 ↓ 232.2 1,158,340 1

Gather (cost=234,367.22..245,038.28 rows=4,989 width=27) (actual time=1,486.375..2,139.619 rows=1,158,340 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 227.945 2,039.250 ↓ 185.7 386,113 3 / 3

Merge Join (cost=233,367.22..243,539.38 rows=2,079 width=27) (actual time=1,550.552..2,039.250 rows=386,113 loops=3)

  • Merge Cond: ((fs.org_num_organisation_org = ((rsf.rsf_num_orga_fam)::numeric)) AND (fs.niv_num_niveau_fam = rsf.rsf_num_niveau_fam) AND (fs.eln_num_elt_niveau_fam = rsf.rsf_eln_niveau_fam))
6. 1,620.928 1,787.438 ↑ 1.6 503,649 3 / 3

Sort (cost=231,929.08..233,954.16 rows=810,030 width=28) (actual time=1,547.940..1,787.438 rows=503,649 loops=3)

  • Sort Key: fs.org_num_organisation_org, fs.niv_num_niveau_fam, fs.eln_num_elt_niveau_fam
  • Sort Method: external merge Disk: 19,328kB
7. 166.510 166.510 ↑ 1.3 645,927 3 / 3

Parallel Seq Scan on flat_structure fs (cost=0.00..133,051.30 rows=810,030 width=28) (actual time=7.108..166.510 rows=645,927 loops=3)

8. 22.705 23.867 ↓ 505.0 385,790 3 / 3

Sort (cost=1,438.14..1,440.05 rows=764 width=36) (actual time=2.604..23.867 rows=385,790 loops=3)

  • Sort Key: ((rsf.rsf_num_orga_fam)::numeric), rsf.rsf_num_niveau_fam, rsf.rsf_eln_niveau_fam
  • Sort Method: quicksort Memory: 97kB
9. 1.162 1.162 ↓ 1.2 933 3 / 3

Index Scan using idx01_rfid_stock_flat on rfid_stock_flat rsf (cost=0.43..1,401.56 rows=764 width=36) (actual time=0.056..1.162 rows=933 loops=3)

  • Index Cond: ((tti_num_type_tiers_tir = 7) AND (tir_num_tiers_tir = 230) AND ((rsf_flag_actif)::text = 'Y'::text))
10. 0.596 2.283 ↑ 1.0 2,621 1

Hash (cost=437.97..437.97 rows=2,621 width=8) (actual time=2.283..2.283 rows=2,621 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 135kB
11. 1.687 1.687 ↑ 1.0 2,621 1

Seq Scan on model_20_80_store ms (cost=0.00..437.97 rows=2,621 width=8) (actual time=0.383..1.687 rows=2,621 loops=1)

  • Filter: ((store_id = 230) AND (now() >= start_date) AND (now() <= end_date))
Planning time : 0.443 ms
Execution time : 3,202.745 ms