explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 97aG

Settings
# exclusive inclusive rows x rows loops node
1. 105.790 3,539.944 ↓ 1.2 933 1

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

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

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

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

Hash Left Join (cost=234,844.51..245,615.34 rows=4,989 width=20) (actual time=1,681.185..2,809.410 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. 473.071 2,527.730 ↓ 232.2 1,158,340 1

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

  • Workers Planned: 2
  • Workers Launched: 2
5. 233.577 2,054.659 ↓ 185.7 386,113 3 / 3

Merge Join (cost=233,367.22..243,539.38 rows=2,079 width=27) (actual time=1,556.041..2,054.659 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,633.434 1,797.333 ↑ 1.6 503,649 3 / 3

Sort (cost=231,929.08..233,954.16 rows=810,030 width=28) (actual time=1,553.805..1,797.333 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: 41,072kB
7. 163.899 163.899 ↑ 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=5.122..163.899 rows=645,927 loops=3)

8. 22.722 23.749 ↓ 505.0 385,789 3 / 3

Sort (cost=1,438.14..1,440.05 rows=764 width=36) (actual time=2.228..23.749 rows=385,789 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.027 1.027 ↓ 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.051..1.027 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.326 1.261 ↑ 1.0 2,621 1

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

  • Buckets: 4,096 Batches: 1 Memory Usage: 135kB
11. 0.935 0.935 ↑ 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.300..0.935 rows=2,621 loops=1)

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