explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YGGT

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 18,061.336 ↓ 0.0 0 1

Limit (cost=2,713,058.19..2,713,058.25 rows=1 width=537) (actual time=18,061.336..18,061.336 rows=0 loops=1)

2. 0.000 18,061.334 ↓ 0.0 0 1

Unique (cost=2,713,058.19..2,713,058.25 rows=1 width=537) (actual time=18,061.334..18,061.334 rows=0 loops=1)

3. 0.054 18,061.334 ↓ 0.0 0 1

Sort (cost=2,713,058.19..2,713,058.20 rows=1 width=537) (actual time=18,061.333..18,061.334 rows=0 loops=1)

  • Sort Key: "QADIDE"."ID_N_A", "QADIDR"."PRIORITY_N", "QADTHI"."THD_ID_N", "QADIDE"."ID_TYP_C", "QADTHI"."THD_A", "QADTHI"."THD_A_EXTENSION_A", "QADTHI"."THD_A_EXTENSION2_A", (CASE WHEN (("QADTHI"."THD_TYPE_C")::text = 'I'::text) THEN "QADPAD"."PRIV_COUNTRY_C" WHEN (("QADTHI"."THD_TYPE_C")::text <> 'I'::text) THEN "QADBRA"."BRA_CTRY_C" ELSE NULL::character varying END), "QADTHI"."LEGAL_FORM_C", "QADTHI"."THD_TYPE_C", "QADTHI"."THD_STA_C", "QADTHI"."THD_NOMENCLATURE_C", "QADTHI"."THD_TRD_SEC_C", (CASE WHEN (("QADTHI"."THD_TYPE_C")::text = 'I'::text) THEN "QADPAD"."PRIV_TEL_N" WHEN (("QADTHI"."THD_TYPE_C")::text <> 'I'::text) THEN "QADBRA"."BRA_TEL_N" ELSE NULL::character varying END), (CASE WHEN (("QADTHI"."THD_TYPE_C")::text = 'I'::text) THEN "QADPAD"."PRIV_STATE_A" WHEN (("QADTHI"."THD_TYPE_C")::text <> 'I'::text) THEN "QADBRA"."BRA_STATE_A" ELSE NULL::character varying END), (CASE WHEN (("QADTHI"."THD_TYPE_C")::text = 'I'::text) THEN "QADPAD"."PRIV_TOWN_A" WHEN (("QADTHI"."THD_TYPE_C")::text <> 'I'::text) THEN "QADBRA"."BRA_TOWN_A" ELSE NULL::character varying END), (CASE WHEN (("QADTHI"."THD_TYPE_C")::text = 'I'::text) THEN "QADPAD"."PRIV_STREET_N_A" WHEN (("QADTHI"."THD_TYPE_C")::text <> 'I'::text) THEN "QADBRA"."BRA_STREET_N_A" ELSE NULL::character varying END), (CASE WHEN (("QADTHI"."THD_TYPE_C")::text = 'I'::text) THEN "QADPAD"."PRIV_STREET_A" WHEN (("QADTHI"."THD_TYPE_C")::text <> 'I'::text) THEN "QADBRA"."BRA_STREET_A" ELSE NULL::character varying END), (CASE WHEN (("QADTHI"."THD_TYPE_C")::text = 'I'::text) THEN "QADPAD"."PRIV_ADD_LINE_A" WHEN (("QADTHI"."THD_TYPE_C")::text <> 'I'::text) THEN "QADBRA"."BRA_ADD_LINE_A" ELSE NULL::character varying END), (CASE WHEN (("QADTHI"."THD_TYPE_C")::text = 'I'::text) THEN "QADPAD"."PRIV_PO_C_A" WHEN (("QADTHI"."THD_TYPE_C")::text <> 'I'::text) THEN "QADBRA"."BRA_POST_C_A" ELSE NULL::character varying END), (CASE WHEN (("QADTHI"."THD_TYPE_C")::text = 'I'::text) THEN NULL::character varying WHEN (("QADTHI"."THD_TYPE_C")::text <> 'I'::text) THEN "QADBRA"."BRA_CY_POST_C_A" ELSE NULL::character varying END), (CASE WHEN (("QADTHI"."THD_TYPE_C")::text = 'I'::text) THEN "QADPAD"."PRIV_PO_BOX_PO_C_A" WHEN (("QADTHI"."THD_TYPE_C")::text <> 'I'::text) THEN "QADBRA"."BRA_PO_BOX_PO_C_A" ELSE NULL::character varying END), (CASE WHEN (("QADTHI"."THD_TYPE_C")::text = 'I'::text) THEN "QADPAD"."PRIV_PO_OFF_BOX_A" WHEN (("QADTHI"."THD_TYPE_C")::text <> 'I'::text) THEN "QADBRA"."BRA_POST_OFF_BOX_A" ELSE NULL::character varying END)
  • Sort Method: quicksort Memory: 25kB
4. 0.000 18,061.280 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,001.57..2,713,058.18 rows=1 width=537) (actual time=18,061.280..18,061.280 rows=0 loops=1)

  • Join Filter: ((("QADIDE"."ID_TYP_C")::text = ("QADIDR"."ID_TYP_C")::text) AND ((("QADBRA"."BRA_CTRY_C")::text = ("QADIDR"."ID_RAN_CTRY_C")::text) OR (("QADPAD"."PRIV_COUNTRY_C")::text = ("QADIDR"."ID_RAN_CTRY_C")::text)))
5. 4.477 18,062.592 ↓ 0.0 0 1

Gather (cost=1,001.57..2,713,004.68 rows=1 width=634) (actual time=18,061.279..18,062.592 rows=0 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 0.000 18,058.115 ↓ 0.0 0 3

Nested Loop Left Join (cost=1.57..2,712,004.58 rows=1 width=634) (actual time=18,058.115..18,058.115 rows=0 loops=3)

  • Join Filter: (("QADTHI"."THD_TYPE_C")::text = 'I'::text)
  • Filter: ((("QADBRA"."BRA_CTRY_C")::text = 'FR'::text) OR (("QADPAD"."PRIV_COUNTRY_C")::text = 'FR'::text))
  • Rows Removed by Filter: 0
7. 0.000 18,058.107 ↓ 0.0 0 3

Nested Loop Left Join (cost=1.13..2,711,847.69 rows=27 width=400) (actual time=17,241.858..18,058.107 rows=0 loops=3)

  • Join Filter: (("QADTHI"."THD_TYPE_C")::text <> 'I'::text)
8. 0.000 18,058.098 ↓ 0.0 0 3

Nested Loop Left Join (cost=0.57..2,711,331.12 rows=27 width=182) (actual time=17,241.850..18,058.098 rows=0 loops=3)

9. 18,058.085 18,058.085 ↓ 0.0 0 3

Parallel Seq Scan on "QADIDE" (cost=0.00..2,711,099.33 rows=27 width=34) (actual time=17,241.837..18,058.085 rows=0 loops=3)

  • Filter: ((btrim(("ID_N_A")::text) ~~ '%482947108'::text) AND (btrim(("ID_TYP_C")::text) = 'SIREN'::text))
  • Rows Removed by Filter: 42297988
10. 0.030 0.030 ↑ 1.0 1 1

Index Scan using "QADTHIU01" on "QADTHI" (cost=0.57..8.59 rows=1 width=152) (actual time=0.030..0.030 rows=1 loops=1)

  • Index Cond: ("QADIDE"."THD_ID_N" = "THD_ID_N")
11. 0.019 0.019 ↑ 20.0 1 1

Index Scan using "QADBRAS01" on "QADBRA" (cost=0.56..18.88 rows=20 width=222) (actual time=0.019..0.019 rows=1 loops=1)

  • Index Cond: ("QADTHI"."THD_ID_N" = "THD_ID_N")
12. 0.019 0.019 ↓ 0.0 0 1

Index Scan using "QADPADU01" on "QADPAD" (cost=0.43..5.79 rows=1 width=238) (actual time=0.019..0.019 rows=0 loops=1)

  • Index Cond: ("QADTHI"."THD_ID_N" = "THD_ID_N")
13. 0.000 0.000 ↓ 0.0 0

Seq Scan on "QADIDR" (cost=0.00..27.07 rows=1,507 width=16) (never executed)