explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uNft

Settings
# exclusive inclusive rows x rows loops node
1. 0.040 613.393 ↓ 56.0 56 1

Unique (cost=362.41..362.51 rows=1 width=308) (actual time=613.352..613.393 rows=56 loops=1)

2. 0.133 613.353 ↓ 56.0 56 1

Sort (cost=362.41..362.42 rows=1 width=308) (actual time=613.351..613.353 rows=56 loops=1)

  • Sort Key: fse.eln_num_elt_niveau_ray, fse.eln_num_elt_niveau_ssr, ((('20'::double precision - date_part('epoch'::text, ((SubPlan 1) / '86400'::double precision))) - date_part('dow'::text, now()))), co.co_id, co.co_libelle, fse.niv_num_niveau_ray, fse.niv_num_niveau_ssr, t.rln_num_niveau, t.rln_eln_niveau, t.rin_inventory_pere, t.rin_inventory, t.tir_sous_num_tiers_tir, t.rin_type_inventory, t.rin_state_inventory, t.rin_description, t.rle_emplacement, t.rln_num_orga, t.rll_lieu_emplacement, t.rlt_type_emplacement, t.rld_type_detail_emplacement, t.rin_date_creation, t.rin_date_inventaire, t.rin_user_id, riiw.tir_sous_num_tiers_tir, fse.org_num_organisation_org, fse.eln_num_elt_niveau_fam, riiw.riiw_num_orga_toinv, riiw.riiw_num_niveau_toinv, riiw.riiw_eln_niveau_toinv_ca, riiw.rriw_coef_saison, riiw.riiw_num_year, riiw.riiw_num_week, riiw.riiw_date_beg, riiw.riiw_date_end, riiw.riiw_user, riiw.riiw_nb_update_ts, riiw.riiw_planified_source
  • Sort Method: quicksort Memory: 53kB
3. 0.116 613.220 ↓ 56.0 56 1

Nested Loop (cost=1.96..362.40 rows=1 width=308) (actual time=80.610..613.220 rows=56 loops=1)

4. 1.048 612.616 ↓ 80.0 80 1

Nested Loop (cost=1.53..353.88 rows=1 width=187) (actual time=31.361..612.616 rows=80 loops=1)

5. 0.362 55.968 ↓ 2,315.0 2,315 1

Nested Loop (cost=0.98..138.80 rows=1 width=98) (actual time=0.055..55.968 rows=2,315 loops=1)

6. 0.036 0.166 ↓ 120.0 120 1

Nested Loop (cost=0.70..78.09 rows=1 width=61) (actual time=0.021..0.166 rows=120 loops=1)

7. 0.016 0.016 ↑ 1.2 6 1

Index Scan using consolid_id_pkey on consolid_id co (cost=0.28..18.94 rows=7 width=41) (actual time=0.009..0.016 rows=6 loops=1)

  • Index Cond: ((tti_type_num_tiers_tir = 7) AND (tir_num_tiers_tir = 2))
  • Filter: (cni_top_delete <> 1)
8. 0.114 0.114 ↓ 20.0 20 6

Index Scan using consolid_detail_pkey on consolid_detail cod (cost=0.41..8.44 rows=1 width=40) (actual time=0.009..0.019 rows=20 loops=6)

  • Index Cond: ((tti_type_num_tiers_tir = 7) AND (tir_num_tiers_tir = 2) AND (co_id = co.co_id))
  • Filter: (cnd_top_delete <> 1)
9. 55.440 55.440 ↑ 1.0 19 120

Index Scan using flat_structure_eln_pkey on flat_structure_eln fse (cost=0.28..60.53 rows=19 width=53) (actual time=0.084..0.462 rows=19 loops=120)

  • Index Cond: (org_num_organisation_org = (cod.org_num_organisation_eln)::numeric)
  • Filter: ((cod.niv_num_niveau_eln = niv_num_niveau_ray) AND (cod.eln_nul_elt_niveau_eln = eln_num_elt_niveau_ray))
  • Rows Removed by Filter: 2,423
10. 555.600 555.600 ↓ 0.0 0 2,315

Index Scan using rfid_inv_inventories_week_pkey on rfid_inv_inventories_week riiw (cost=0.55..215.06 rows=1 width=101) (actual time=0.236..0.240 rows=0 loops=2,315)

  • Index Cond: ((tti_num_type_tiers_tir = 7) AND (tir_num_tiers_tir = 2) AND (riiw_num_niveau_toinv = fse.niv_num_niveau_fam) AND (riiw_eln_niveau_toinv = fse.eln_num_elt_niveau_fam) AND (riiw_num_year < 9999))
  • Filter: ((fse.org_num_organisation_org = (riiw_num_orga_toinv)::numeric) AND (((riiw_num_year * 100) + riiw_num_week) >= 202,030) AND (((riiw_num_year * 100) + riiw_num_week) <= 202,033))
  • Rows Removed by Filter: 2
11. 0.320 0.320 ↑ 1.0 1 80

Index Scan using rfid_inv_inventory_pkey on rfid_inv_inventory t (cost=0.43..8.46 rows=1 width=117) (actual time=0.004..0.004 rows=1 loops=80)

  • Index Cond: ((rin_inventory = riiw.rin_inventory) AND (tti_num_type_tiers_tir = 7) AND (tir_num_tiers_tir = 2))
  • Filter: (rin_state_inventory = ANY ('{0,99,-2,-1,8,2,3,4}'::integer[]))
  • Rows Removed by Filter: 0
12.          

SubPlan (for Nested Loop)

13. 0.168 0.168 ↑ 1.0 1 56

Result (cost=0.00..0.04 rows=1 width=16) (actual time=0.002..0.003 rows=1 loops=56)

Planning time : 2.108 ms
Execution time : 613.494 ms