explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yHGS

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=3,497,038.92..4,231,148.47 rows=843,867 width=2,971) (actual rows= loops=)

  • Hash Cond: (deals.id = db.deal_id)
2. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=3,490,573.65..4,032,697.00 rows=843,867 width=867) (actual rows= loops=)

  • Hash Cond: (cu.payment_mode_id = pm.id)
3. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=3,490,572.35..4,021,092.54 rows=843,867 width=853) (actual rows= loops=)

  • Hash Cond: (deals."addressId" = t12.id)
4. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=3,424,810.18..3,757,024.20 rows=843,867 width=834) (actual rows= loops=)

  • Hash Cond: (t1.customer_id = t13.id)
5. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=2,981,315.08..3,109,323.28 rows=843,867 width=827) (actual rows= loops=)

  • Hash Cond: (sq_payments.sq_id = t1.id)
6. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=23,856.59..52,899.20 rows=666,533 width=8) (actual rows= loops=)

  • Hash Cond: (sq_payments.customer_payment_id = cu.id)
7. 0.000 0.000 ↓ 0.0

Seq Scan on sq_payments (cost=0.00..13,242.87 rows=666,533 width=8) (actual rows= loops=)

  • Filter: (payment_change_request_date IS NULL)
8. 0.000 0.000 ↓ 0.0

Hash (cost=15,135.93..15,135.93 rows=531,493 width=8) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Seq Scan on customer_payment cu (cost=0.00..15,135.93 rows=531,493 width=8) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Hash (cost=2,859,556.15..2,859,556.15 rows=843,867 width=823) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2,033,614.91..2,859,556.15 rows=843,867 width=823) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=2,033,614.48..2,356,222.80 rows=599,439 width=798) (actual rows= loops=)

  • Hash Cond: (deals.current_status = t8.id)
13. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=2,033,612.85..2,348,180.89 rows=599,439 width=785) (actual rows= loops=)

  • Hash Cond: (deals."assignedTo" = us1.id)
14. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=2,033,334.20..2,343,386.86 rows=599,439 width=772) (actual rows= loops=)

  • Hash Cond: (deals."assignedDealerId" = t6.id)
15. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=2,032,692.90..2,334,935.88 rows=599,439 width=737) (actual rows= loops=)

  • Hash Cond: (deals."sellQueryId" = t1.id)
  • Filter: ((date(t1."dateCreated") >= (('now'::cstring)::date - 60)) OR (date(t1."dateTime") >= (('now'::cstring)::date - 60)) OR (date(deals.created_at) >= (('now'::cstring)::date - 60)) OR (date(deals.updated_at) >= (('now'::cstring)::date - 60)) OR (date(deals.requote_date) >= (('now'::cstring)::date - 60)) OR (date(deals.complete_fail_date) >= (('now'::cstring)::date - 60)))
16. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=235,606.60..283,691.45 rows=1,061,191 width=291) (actual rows= loops=)

  • Hash Cond: (dcp.deal_id = deals.id)
17. 0.000 0.000 ↓ 0.0

Subquery Scan on dcp (cost=41,693.34..47,295.92 rows=245,103 width=59) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Unique (cost=41,693.34..44,844.89 rows=245,103 width=59) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Sort (cost=41,693.34..42,323.65 rows=252,124 width=59) (actual rows= loops=)

  • Sort Key: deals_customer_payment.deal_id, deals_customer_payment.transaction_id, deals_customer_payment.payment_mode, deals_customer_payment.payment_ref
20. 0.000 0.000 ↓ 0.0

Seq Scan on deals_customer_payment (cost=0.00..9,591.56 rows=252,124 width=59) (actual rows= loops=)

  • Filter: (status = 1)
21. 0.000 0.000 ↓ 0.0

Hash (cost=146,449.37..146,449.37 rows=1,061,191 width=236) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Seq Scan on deals (cost=0.00..146,449.37 rows=1,061,191 width=236) (actual rows= loops=)

  • Filter: (((email)::text !~~ '%test%'::text) AND ((mobile)::text <> ALL ('{9999999999,1234567890}'::text[])) AND (("firstName")::text !~~ '%test%'::text) AND (is_duplicate = 0) AND (is_test = 0) AND ((pincode)::text !~~ '999999'::text))
23. 0.000 0.000 ↓ 0.0

Hash (cost=1,698,969.06..1,698,969.06 rows=1,380,099 width=450) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,685.10..1,698,969.06 rows=1,380,099 width=450) (actual rows= loops=)

  • Hash Cond: (t1."currentStatus" = t2."actionId")
25. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,677.77..1,679,985.38 rows=1,380,099 width=423) (actual rows= loops=)

  • Hash Cond: (t1.city_id = regc.id)
26. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,597.32..1,662,730.97 rows=1,380,099 width=418) (actual rows= loops=)

  • Hash Cond: (t1.rgcal_product_id = pd.id)
27. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=0.86..1,643,622.45 rows=1,380,099 width=388) (actual rows= loops=)

  • Merge Cond: (t1."queryId" = rpq.id)
28. 0.000 0.000 ↓ 0.0

Index Scan using sq_query_id_index on sell_queries t1 (cost=0.43..231,638.45 rows=1,380,099 width=379) (actual rows= loops=)

  • Filter: (("isRepair" = 0) AND (is_test = 0) AND ((mobile)::text <> ALL ('{9999999999,9876543210,1234567890}'::text[])) AND ((pincode)::text !~~ '999999'::text) AND ((mobile)::text <> ALL ('{9871466622,8884609635,9958714803,8447795148,9651869594,7597540975,7292085621,7500900582,7503358491,8448381775,8448381776,9810836517,8448998568,9711210706,8860537644,8090492998,8447356692,9549006092,9953432552,9131644162}'::text[])))
29. 0.000 0.000 ↓ 0.0

Index Scan using queries_pkey on queries rpq (cost=0.44..1,334,665.96 rows=24,026,718 width=21) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Hash (cost=1,325.03..1,325.03 rows=21,714 width=34) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=15.32..1,325.03 rows=21,714 width=34) (actual rows= loops=)

  • Hash Cond: (pd.product_brand_id = pb.id)
32. 0.000 0.000 ↓ 0.0

Seq Scan on product_details pd (cost=0.00..1,011.14 rows=21,714 width=31) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Hash (cost=10.70..10.70 rows=370 width=11) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Seq Scan on product_brand pb (cost=0.00..10.70 rows=370 width=11) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Hash (cost=50.20..50.20 rows=2,420 width=13) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Seq Scan on reglobe_cities regc (cost=0.00..50.20 rows=2,420 width=13) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Hash (cost=6.59..6.59 rows=59 width=35) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Seq Scan on reglobe_actions t2 (cost=0.00..6.59 rows=59 width=35) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Hash (cost=616.92..616.92 rows=1,950 width=39) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=278.65..616.92 rows=1,950 width=39) (actual rows= loops=)

  • Hash Cond: (t6.user_id = t7.id)
41. 0.000 0.000 ↓ 0.0

Seq Scan on dealers t6 (cost=0.00..312.50 rows=1,950 width=30) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Hash (cost=204.40..204.40 rows=5,940 width=17) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Seq Scan on users t7 (cost=0.00..204.40 rows=5,940 width=17) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Hash (cost=204.40..204.40 rows=5,940 width=17) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Seq Scan on users us1 (cost=0.00..204.40 rows=5,940 width=17) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

Hash (cost=1.28..1.28 rows=28 width=21) (actual rows= loops=)

47. 0.000 0.000 ↓ 0.0

Seq Scan on lead_actions t8 (cost=0.00..1.28 rows=28 width=21) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Index Scan using qt_query_id_idx on queries_transactions (cost=0.43..0.83 rows=1 width=29) (actual rows= loops=)

  • Index Cond: (t1."queryId" = query_id)
  • Filter: (delete_at IS NULL)
49. 0.000 0.000 ↓ 0.0

Hash (cost=388,742.47..388,742.47 rows=3,149,811 width=15) (actual rows= loops=)

50. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=191,854.75..388,742.47 rows=3,149,811 width=15) (actual rows= loops=)

  • Hash Cond: (t13.referral_by = t14.id)
51. 0.000 0.000 ↓ 0.0

Seq Scan on customer t13 (cost=0.00..137,102.11 rows=3,149,811 width=8) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Hash (cost=137,102.11..137,102.11 rows=3,149,811 width=11) (actual rows= loops=)

53. 0.000 0.000 ↓ 0.0

Seq Scan on customer t14 (cost=0.00..137,102.11 rows=3,149,811 width=11) (actual rows= loops=)

54. 0.000 0.000 ↓ 0.0

Hash (cost=41,157.52..41,157.52 rows=1,272,452 width=27) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

Seq Scan on addresses t12 (cost=0.00..41,157.52 rows=1,272,452 width=27) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Hash (cost=1.13..1.13 rows=13 width=22) (actual rows= loops=)

57. 0.000 0.000 ↓ 0.0

Seq Scan on payment_mode pm (cost=0.00..1.13 rows=13 width=22) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Hash (cost=3,318.90..3,318.90 rows=180,990 width=14) (actual rows= loops=)

59. 0.000 0.000 ↓ 0.0

Seq Scan on deal_barcode db (cost=0.00..3,318.90 rows=180,990 width=14) (actual rows= loops=)