explain.depesz.com

PostgreSQL's explain analyze made readable

Result: L2H

Settings
# exclusive inclusive rows x rows loops node
1. 0.022 0.574 ↑ 96.7 3 1

Sort (cost=494.79..494.94 rows=290 width=1,676) (actual time=0.574..0.574 rows=3 loops=1)

  • Sort Key: ids.sort_order__c
  • Sort Method: quicksort Memory: 25kB
2.          

CTE ids

3. 0.008 0.544 ↑ 97.0 3 1

Recursive Union (cost=3.46..490.53 rows=291 width=219) (actual time=0.117..0.544 rows=3 loops=1)

4. 0.006 0.134 ↓ 2.0 2 1

Nested Loop (cost=3.46..9.15 rows=1 width=219) (actual time=0.114..0.134 rows=2 loops=1)

5. 0.025 0.094 ↓ 2.0 2 1

Hash Join (cost=3.40..6.71 rows=1 width=187) (actual time=0.082..0.094 rows=2 loops=1)

6. 0.018 0.018 ↑ 1.0 81 1

Seq Scan on cpq_plan_component__c pcomp (cost=0.00..3.24 rows=81 width=145) (actual time=0.004..0.018 rows=81 loops=1)

7. 0.003 0.051 ↑ 1.0 1 1

Hash (cost=3.40..3.40 rows=1 width=61) (actual time=0.051..0.051 rows=1 loops=1)

8. 0.017 0.048 ↑ 1.0 1 1

Hash Join (cost=1.18..3.40 rows=1 width=61) (actual time=0.040..0.048 rows=1 loops=1)

9. 0.018 0.018 ↑ 1.0 37 1

Seq Scan on cpq_plan_product_code__c ppc (cost=0.00..2.20 rows=37 width=63) (actual time=0.004..0.018 rows=37 loops=1)

  • Filter: ((ppc.version__c)::text = '1.0.0'::text)
10. 0.005 0.013 ↑ 1.0 1 1

Hash (cost=1.18..1.18 rows=1 width=36) (actual time=0.013..0.013 rows=1 loops=1)

11. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on cpq_product_code__c pc (cost=0.00..1.18 rows=1 width=36) (actual time=0.003..0.008 rows=1 loops=1)

  • Filter: ((pc.name)::text = 'IP-DIA'::text)
12. 0.034 0.034 ↑ 1.0 1 2

Index Scan using hcu_idx_cpq_plan__c_sfid on cpq_plan__c plan (cost=0.06..2.44 rows=1 width=32) (actual time=0.017..0.017 rows=1 loops=2)

  • Index Cond: ((plan.sfid)::text = (ppc.cpq_plan__c)::text)
13. 0.013 0.402 ↓ 0.0 0 2

Hash Join (cost=16.73..47.96 rows=29 width=219) (actual time=0.200..0.201 rows=0 loops=2)

14. 0.082 0.368 ↓ 0.0 0 2

Merge Join (cost=15.40..46.62 rows=29 width=221) (actual time=0.183..0.184 rows=0 loops=2)

15. 0.120 0.120 ↑ 47.0 52 2

Index Scan using hcu_idx_cpq_plan__c_sfid on cpq_plan__c plan_1 (cost=0.06..163.60 rows=2,442 width=32) (actual time=0.008..0.060 rows=52 loops=2)

16. 0.028 0.166 ↓ 0.0 0 2

Sort (cost=8.53..8.54 rows=29 width=208) (actual time=0.083..0.083 rows=0 loops=2)

  • Sort Key: ppc_1.cpq_plan__c
  • Sort Method: quicksort Memory: 25kB
17. 0.009 0.138 ↓ 0.0 0 2

Hash Join (cost=4.93..8.39 rows=29 width=208) (actual time=0.064..0.069 rows=0 loops=2)

18. 0.028 0.100 ↓ 0.0 0 2

Hash Join (cost=2.56..6.00 rows=32 width=164) (actual time=0.045..0.050 rows=0 loops=2)

19. 0.008 0.008 ↑ 1.0 81 1

Seq Scan on cpq_plan_component__c pcomp_1 (cost=0.00..3.24 rows=81 width=145) (actual time=0.001..0.008 rows=81 loops=1)

20. 0.008 0.064 ↓ 0.0 0 2

Hash (cost=2.45..2.45 rows=32 width=38) (actual time=0.032..0.032 rows=0 loops=2)

21. 0.026 0.056 ↓ 0.0 0 2

Hash Join (cost=0.10..2.45 rows=32 width=38) (actual time=0.019..0.028 rows=0 loops=2)

22. 0.022 0.022 ↑ 1.0 68 2

Seq Scan on cpq_plan_component_relationship__c compr (cost=0.00..2.20 rows=68 width=38) (actual time=0.002..0.011 rows=68 loops=2)

23. 0.006 0.008 ↑ 5.0 2 2

Hash (cost=0.06..0.06 rows=10 width=54) (actual time=0.004..0.004 rows=2 loops=2)

24. 0.002 0.002 ↑ 5.0 2 2

WorkTable Scan (cost=0.00..0.06 rows=10 width=54) (actual time=0.001..0.001 rows=2 loops=2)

25. 0.016 0.029 ↑ 1.0 57 1

Hash (cost=2.17..2.17 rows=57 width=63) (actual time=0.029..0.029 rows=57 loops=1)

26. 0.013 0.013 ↑ 1.0 57 1

Seq Scan on cpq_plan_product_code__c ppc_1 (cost=0.00..2.17 rows=57 width=63) (actual time=0.002..0.013 rows=57 loops=1)

27. 0.012 0.021 ↑ 1.0 50 1

Hash (cost=1.15..1.15 rows=50 width=36) (actual time=0.021..0.021 rows=50 loops=1)

28. 0.009 0.009 ↑ 1.0 50 1

Seq Scan on cpq_product_code__c pc_1 (cost=0.00..1.15 rows=50 width=36) (actual time=0.002..0.009 rows=50 loops=1)

29. 0.552 0.552 ↑ 96.7 3 1

CTE Scan on ids ids (cost=0.00..1.89 rows=290 width=1,676) (actual time=0.121..0.552 rows=3 loops=1)

  • Filter: (ids.cpq_plan_product_code__c IS NOT NULL)