explain.depesz.com

PostgreSQL's explain analyze made readable

Result: A9Ro

Settings
# exclusive inclusive rows x rows loops node
1. 5.206 535.073 ↓ 414.8 5,392 1

Unique (cost=14,107.68..14,108.43 rows=13 width=286) (actual time=529.032..535.073 rows=5,392 loops=1)

2. 45.176 529.867 ↓ 439.4 5,712 1

Sort (cost=14,107.68..14,107.72 rows=13 width=286) (actual time=529.030..529.867 rows=5,712 loops=1)

  • Sort Key: c.year, c.part_number, c.epc_part_number, c.substitute, c.qty, c.part_name, c.epc_part_name, c.feature, c.image, c.image_index, c.image_name, c.first_level_id, c.first_level_name, c.second_level_id, c.second_level_name, c.rank, c."position", c.sub_chain, c.part_cd, c.btzeilen_bedkez, c.dev_series, c.assembly_flag
  • Sort Method: quicksort Memory: 2296kB
3. 2.681 484.691 ↓ 439.4 5,712 1

Subquery Scan on c (cost=12,918.82..14,107.44 rows=13 width=286) (actual time=471.294..484.691 rows=5,712 loops=1)

  • Filter: ((c.rank = 1) OR ((c.btzeilen_bedkez = 'B'::text) AND ((c.dev_series)::text = ANY ('{"F35 (MUE)","F30 (MUE)"}'::text[]))))
  • Rows Removed by Filter: 285
4. 9.795 482.010 ↓ 2.8 5,997 1

WindowAgg (cost=12,918.82..14,069.45 rows=2,171 width=318) (actual time=471.290..482.010 rows=5,997 loops=1)

5. 28.873 472.215 ↓ 2.8 5,997 1

Sort (cost=12,918.82..12,924.25 rows=2,171 width=274) (actual time=471.271..472.215 rows=5,997 loops=1)

  • Sort Key: t2.image, t2.image_index, (CASE WHEN ((t2.data_source)::text = '1'::text) THEN bmw.offline_matched_fun(t1.new_pr_list, (t1.steering)::text, t2.group_pr, t2.section_pr, t2.part_pr, t2.drive_type) ELSE bmw.ol_matched_fun(t1.new_pr_list, (t1.steering)::text, t2.section_pr, t2.part_pr, t2.drive_type) END) DESC
  • Sort Method: quicksort Memory: 2156kB
6. 44.042 443.342 ↓ 2.8 5,997 1

Nested Loop (cost=1.13..12,798.50 rows=2,171 width=274) (actual time=64.634..443.342 rows=5,997 loops=1)

7. 0.989 0.989 ↑ 1.0 1 1

Index Scan using s_mj_pr_repository_2020331182732_idx_1 on mj_pr_repository t1 (cost=0.56..8.58 rows=1 width=276) (actual time=0.988..0.989 rows=1 loops=1)

  • Index Cond: ((vin)::text = 'WBA8F1C57JAE97249'::text)
8. 398.311 398.311 ↓ 2.8 5,997 1

Index Scan using s_part_matched_all_2020515102057_idx_1 on part_matched_all t2 (cost=0.57..11,677.32 rows=2,168 width=296) (actual time=63.628..398.311 rows=5,997 loops=1)

  • Index Cond: (new_vehicle = t1.new_vehicle)
  • Filter: (((start_date)::text <= t1.fgstnr_prod) AND ((end_date)::text > t1.fgstnr_prod) AND (CASE WHEN ((data_source)::text = '1'::text) THEN bmw.offline_matched_fun(t1.new_pr_list, (t1.steering)::text, group_pr, section_pr, part_pr, drive_type) ELSE bmw.ol_matched_fun(t1.new_pr_list, (t1.steering)::text, section_pr, part_pr, drive_type) END <> '-9999'::numeric))
  • Rows Removed by Filter: 21093
Planning time : 84.347 ms
Execution time : 537.229 ms