explain.depesz.com

A tool for finding a real cause for slow queries.

Result: g4T

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Subquery Scan on "Swiss_client_wise_minutes_and_profit" (cost=2,127,919.71..94,874,537.55 rows=40,474 width=677) (actual time=.. rows= loops=)

2. 0.000 0.000 ↓ 0.0

WindowAgg (cost=2,127,919.71..94,773,352.06 rows=8,094,839 width=148) (actual time=.. rows= loops=)

3. 0.000 0.000 ↓ 0.0

Sort (cost=2,127,919.71..2,148,156.81 rows=8,094,839 width=148) (actual time=.. rows= loops=)

  • Sort Key: cc.name, rdga.group_id
4. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,661.50..604,234.77 rows=8,094,839 width=148) (actual time=.. rows= loops=)

  • Hash Cond: (((cc.company_id)::text = (rdga.company_id)::text) AND ((cs.c_prefix_id)::text = (rdga.dest_id)::text))
5. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=7.88..460,615.39 rows=8,094,839 width=123) (actual time=.. rows= loops=)

  • Hash Cond: ((cs.client_name_id)::text = (cc."Alias_name")::text)
6. 0.000 0.000 ↓ 0.0

Append (cost=0.00..349,303.48 rows=8,094,839 width=111) (actual time=.. rows= loops=)

7. 0.000 0.000 ↓ 0.0

Seq Scan on "Swiss_buz_scdr" cs (cost=0.00..1.06 rows=1 width=610) (actual time=.. rows= loops=)

  • Filter: ((customer_name)::text = 'SSP Root'::text)
8. 0.000 0.000 ↓ 0.0

Seq Scan on scdr_buz__2012_07_11 cs (cost=0.00..349,302.41 rows=8,094,838 width=111) (actual time=.. rows= loops=)

  • Filter: ((customer_name)::text = 'SSP Root'::text)
9. 0.000 0.000 ↓ 0.0

Hash (cost=5.17..5.17 rows=217 width=24) (actual time=.. rows= loops=)

10. 0.000 0.000 ↓ 0.0

Seq Scan on "Corporate_companyalias" cc (cost=0.00..5.17 rows=217 width=24) (actual time=.. rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash (cost=1,334.42..1,334.42 rows=21,280 width=50) (actual time=.. rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash Join (cost=169.56..1,334.42 rows=21,280 width=50) (actual time=.. rows= loops=)

  • Hash Cond: ((rdga.company_id)::text = (c.name)::text)
13. 0.000 0.000 ↓ 0.0

Hash Join (cost=162.68..1,034.93 rows=21,280 width=50) (actual time=.. rows= loops=)

  • Hash Cond: ((rdga.group_id)::text = (rdg.name)::text)
14. 0.000 0.000 ↓ 0.0

Seq Scan on "RateManagement_destgroupassign" rdga (cost=0.00..497.35 rows=25,935 width=40) (actual time=.. rows= loops=)

15. 0.000 0.000 ↓ 0.0

Hash (cost=123.64..123.64 rows=3,123 width=32) (actual time=.. rows= loops=)

16. 0.000 0.000 ↓ 0.0

Hash Join (cost=13.08..123.64 rows=3,123 width=32) (actual time=.. rows= loops=)

  • Hash Cond: (rdg.country_id = cc.id)
17. 0.000 0.000 ↓ 0.0

Seq Scan on "RateManagement_destinationgroup" rdg (cost=0.00..65.06 rows=3,806 width=26) (actual time=.. rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash (cost=7.48..7.48 rows=448 width=14) (actual time=.. rows= loops=)

19. 0.000 0.000 ↓ 0.0

Seq Scan on "Corporate_country" cc (cost=0.00..7.48 rows=448 width=14) (actual time=.. rows= loops=)

20. 0.000 0.000 ↓ 0.0

Hash (cost=4.17..4.17 rows=217 width=16) (actual time=.. rows= loops=)

21. 0.000 0.000 ↓ 0.0

Seq Scan on "Corporate_company" c (cost=0.00..4.17 rows=217 width=16) (actual time=.. rows= loops=)

22.          

SubPlan (forWindowAgg)

23. 0.000 0.000 ↓ 0.0

Seq Scan on "Corporate_companyalias" cc (cost=0.00..5.71 rows=1 width=12) (actual time=.. rows= loops=)

  • Filter: (("Alias_name")::text = (cs.client_name_id)::text)
24. 0.000 0.000 ↓ 0.0

Seq Scan on "Corporate_companyalias" cc (cost=0.00..5.71 rows=1 width=12) (actual time=.. rows= loops=)

  • Filter: (("Alias_name")::text = (cs.vendor_name_id)::text)