explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dUaO

Settings
# exclusive inclusive rows x rows loops node
1. 0.220 319,652.946 ↑ 39.4 51 1

HashAggregate (cost=12,437.86..12,457.95 rows=2,009 width=850) (actual time=319,652.860..319,652.946 rows=51 loops=1)

  • Group Key: "*SELECT* 1".id, "*SELECT* 1".fid, "*SELECT* 1".funnel_id, "*SELECT* 1".product_group, "*SELECT* 1".product_brand_id, "*SELECT* 1".product_group_name, "*SELECT* 1".brand_name, "*SELECT* 1".no_of_order, "*SELECT* 1".no_of_cancel_order, "*SELECT* 1".gross_order, "*SELECT* 1".product_uom_qty, "*SELECT* 1".revenue, "*SELECT* 1".revenue_with_tax, "*SELECT* 1".refund_amount, "*SELECT* 1".source_id, "*SELECT* 1".medium_id, (0), "*SELECT* 1".fb_spends, "*SELECT* 1".fb_uc, "*SELECT* 1".cpc, "*SELECT* 1".purchase_value, "*SELECT* 1".fbroas, "*SELECT* 1".cogs, "*SELECT* 1".is_affiliate_funnel, "*SELECT* 1".country_id, "*SELECT* 1".total_clicks, "*SELECT* 1".unique_clicks, "*SELECT* 1".cart_uc, "*SELECT* 1".revenue_per_order, "*SELECT* 1".transaction_fees, "*SELECT* 1".no_of_pickings, "*SELECT* 1".fulfilment_cost, "*SELECT* 1".billed_cost, "*SELECT* 1".cos, "*SELECT* 1".declined, "*SELECT* 1".target_cpa, "*SELECT* 1".is_active_funnel, "*SELECT* 1".rpc, "*SELECT* 1".cart_cr, "*SELECT* 1".conv_rate, "*SELECT* 1".aogp, "*SELECT* 1".gross_profit, "*SELECT* 1".gp_refund_diff, "*SELECT* 1".net_profit, "*SELECT* 1".np_refund_diff, "*SELECT* 1".total_cost, "*SELECT* 1".aoc, "*SELECT* 1".refund_rate, "*SELECT* 1".margin, (0), (0), (0), "*SELECT* 1".roas, (0), (0), (0), (0), (20.0), (NULL::double precision), (NULL::double precision), (NULL::double precision), (NULL::double precision), (NULL::double precision)
2.          

CTE raw_data

3. 318,997.258 318,997.258 ↓ 55.0 55,000 1

Function Scan on raw_data raw_data_1 (cost=0.25..10.25 rows=1,000 width=346) (actual time=318,991.237..318,997.258 rows=55,000 loops=1)

4. 0.006 319,652.726 ↑ 39.4 51 1

Append (cost=10,213.78..12,111.20 rows=2,009 width=850) (actual time=319,617.417..319,652.726 rows=51 loops=1)

5. 0.021 319,617.844 ↑ 39.2 51 1

Subquery Scan on *SELECT* 1 (cost=10,213.78..11,184.26 rows=2,001 width=805) (actual time=319,617.416..319,617.844 rows=51 loops=1)

6. 0.261 319,617.823 ↑ 39.2 51 1

WindowAgg (cost=10,213.78..11,164.25 rows=2,001 width=916) (actual time=319,617.414..319,617.823 rows=51 loops=1)

7. 0.186 319,617.562 ↑ 39.2 51 1

GroupAggregate (cost=10,213.78..10,784.06 rows=2,001 width=615) (actual time=319,617.389..319,617.562 rows=51 loops=1)

  • Group Key: f.id, "*SELECT* 1_1".medium_id, "*SELECT* 1_1".source_id, "*SELECT* 1_1".country_id, c.country_id, "*SELECT* 1_1".ssd_source, "*SELECT* 1_1".is_active_funnel, c.active
8. 0.087 319,617.376 ↑ 39.2 51 1

Sort (cost=10,213.78..10,218.78 rows=2,001 width=511) (actual time=319,617.370..319,617.376 rows=51 loops=1)

  • Sort Key: f.id, "*SELECT* 1_1".medium_id, "*SELECT* 1_1".source_id, "*SELECT* 1_1".country_id, c.country_id, "*SELECT* 1_1".ssd_source, "*SELECT* 1_1".is_active_funnel, c.active
  • Sort Method: quicksort Memory: 41kB
9. 0.034 319,617.289 ↑ 39.2 51 1

Hash Left Join (cost=3,877.16..10,104.06 rows=2,001 width=511) (actual time=319,614.411..319,617.289 rows=51 loops=1)

  • Hash Cond: ((COALESCE(f.name, 'Direct Sales'::character varying))::text = (tran.funnel_id)::text)
10. 1.378 319,599.720 ↑ 39.2 51 1

Nested Loop Left Join (cost=3,860.39..10,079.69 rows=2,001 width=447) (actual time=319,596.865..319,599.720 rows=51 loops=1)

  • Join Filter: ((f.id = "*SELECT* 1_1".fid) OR (f.id = c.funnel_id))
  • Rows Removed by Join Filter: 17901
11. 0.035 319,586.714 ↑ 19.6 51 1

Hash Full Join (cost=3,860.39..3,887.97 rows=1,002 width=370) (actual time=319,586.650..319,586.714 rows=51 loops=1)

  • Hash Cond: (("*SELECT* 1_1".fid = c.funnel_id) AND ("*SELECT* 1_1".country_id = c.country_id))
  • Join Filter: (((1) = 1) AND ((COALESCE("*SELECT* 1_1".source_id, 'no_source'::character varying))::text ~~ (c.source)::text) AND ((COALESCE("*SELECT* 1_1".medium_id, 'no_medium'::character varying))::text ~~ (c.medium)::text))
12. 0.098 319,573.026 ↑ 19.6 51 1

HashAggregate (cost=781.56..791.58 rows=1,002 width=353) (actual time=319,572.985..319,573.026 rows=51 loops=1)

  • Group Key: "*SELECT* 1_1".product_group_id, "*SELECT* 1_1".fid, "*SELECT* 1_1".no_of_order, "*SELECT* 1_1".no_of_cancel_order, "*SELECT* 1_1".gross_order, "*SELECT* 1_1".revenue, "*SELECT* 1_1".revenue_with_tax, "*SELECT* 1_1".refund_amount, "*SELECT* 1_1".product_uom_qty, "*SELECT* 1_1".ssd_source, "*SELECT* 1_1".source_id, "*SELECT* 1_1".medium_id, "*SELECT* 1_1".country_id, "*SELECT* 1_1".cogs, "*SELECT* 1_1".fb_spends, (NULL::double precision), (NULL::integer), (NULL::double precision), (NULL::integer), "*SELECT* 1_1".transaction_fees, "*SELECT* 1_1".no_of_pickings, "*SELECT* 1_1".fulfilment_cost, "*SELECT* 1_1".billed_cost, "*SELECT* 1_1".cos, (1), (NULL::bigint), "*SELECT* 1_1".is_active_funnel
13. 0.005 319,572.928 ↑ 19.6 51 1

Append (cost=315.25..713.92 rows=1,002 width=353) (actual time=319,383.983..319,572.928 rows=51 loops=1)

14. 0.009 319,384.056 ↑ 19.6 51 1

Subquery Scan on *SELECT* 1_1 (cost=315.25..390.25 rows=1,000 width=331) (actual time=319,383.982..319,384.056 rows=51 loops=1)

15. 43.891 319,384.047 ↑ 19.6 51 1

HashAggregate (cost=315.25..380.25 rows=1,000 width=342) (actual time=319,383.979..319,384.047 rows=51 loops=1)

  • Group Key: rd.fid, rd.product_group_id, rd.source_id, rd.medium_id, rd.country_id, fa_1.name, fac_1.name, us2.name, rd.is_affiliate_funnel, rd.active_funnel
16. 15.426 319,340.156 ↓ 55.0 55,000 1

Hash Left Join (cost=68.49..242.75 rows=1,000 width=314) (actual time=319,057.596..319,340.156 rows=55,000 loops=1)

  • Hash Cond: (rd.fid = fac.funnel_id)
  • Join Filter: (lower((rd.source_id)::text) ~~* ('%'::text || (fa_1.name)::text))
  • Rows Removed by Join Filter: 9954
17. 21.867 319,315.295 ↓ 55.0 55,000 1

Hash Left Join (cost=64.04..212.05 rows=1,000 width=301) (actual time=319,048.157..319,315.295 rows=55,000 loops=1)

  • Hash Cond: (lower((rd.source_id)::text) = lower((us2.name)::text))
18. 202.801 319,256.696 ↓ 55.0 55,000 1

Nested Loop Left Join (cost=0.00..141.47 rows=1,000 width=283) (actual time=319,011.410..319,256.696 rows=55,000 loops=1)

  • Join Filter: (lower((rd.source_id)::text) ~~* ((fac_1.name)::text || '%'::text))
  • Rows Removed by Join Filter: 330000
19. 318,998.895 318,998.895 ↓ 55.0 55,000 1

CTE Scan on raw_data rd (cost=0.00..20.00 rows=1,000 width=270) (actual time=318,991.239..318,998.895 rows=55,000 loops=1)

20. 34.887 55.000 ↑ 1.0 6 55,000

Materialize (cost=0.00..1.48 rows=6 width=13) (actual time=0.000..0.001 rows=6 loops=55,000)

21. 20.113 20.113 ↑ 1.0 6 1

Seq Scan on funnel_affiliates fac_1 (cost=0.00..1.45 rows=6 width=13) (actual time=20.110..20.113 rows=6 loops=1)

  • Filter: (parent_id IS NULL)
  • Rows Removed by Filter: 39
22. 0.000 36.732 ↓ 0.0 0 1

Hash (cost=63.96..63.96 rows=6 width=18) (actual time=36.732..36.732 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
23. 0.002 36.732 ↓ 0.0 0 1

GroupAggregate (cost=63.72..63.90 rows=6 width=18) (actual time=36.732..36.732 rows=0 loops=1)

  • Group Key: us2.name
24. 0.004 36.730 ↓ 0.0 0 1

Sort (cost=63.72..63.74 rows=6 width=26) (actual time=36.730..36.730 rows=0 loops=1)

  • Sort Key: us2.name
  • Sort Method: quicksort Memory: 25kB
25. 0.011 36.726 ↓ 0.0 0 1

Hash Join (cost=58.34..63.65 rows=6 width=26) (actual time=36.726..36.726 rows=0 loops=1)

  • Hash Cond: (lower((raw_data.source_id)::text) = lower((us2.name)::text))
26. 11.143 28.598 ↑ 200.0 1 1

HashAggregate (cost=25.00..27.00 rows=200 width=40) (actual time=28.598..28.598 rows=1 loops=1)

  • Group Key: raw_data.source_id
27. 17.455 17.455 ↓ 55.0 55,000 1

CTE Scan on raw_data (cost=0.00..20.00 rows=1,000 width=36) (actual time=0.001..17.455 rows=55,000 loops=1)

28. 0.001 8.117 ↓ 0.0 0 1

Hash (cost=33.26..33.26 rows=6 width=18) (actual time=8.117..8.117 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
29. 0.011 8.116 ↓ 0.0 0 1

Hash Join (cost=27.02..33.26 rows=6 width=18) (actual time=8.116..8.116 rows=0 loops=1)

  • Hash Cond: (us2.id = sc.utm_source_id)
30. 8.101 8.101 ↑ 231.0 1 1

Seq Scan on utm_source us2 (cost=0.00..5.31 rows=231 width=14) (actual time=8.101..8.101 rows=1 loops=1)

31. 0.000 0.004 ↓ 0.0 0 1

Hash (cost=26.95..26.95 rows=6 width=12) (actual time=0.004..0.004 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
32. 0.004 0.004 ↓ 0.0 0 1

Seq Scan on spend_channel sc (cost=0.00..26.95 rows=6 width=12) (actual time=0.003..0.004 rows=0 loops=1)

  • Filter: ((spend_date >= '2019-11-06'::date) AND (spend_date <= '2019-11-06'::date))
33. 0.006 9.435 ↑ 1.2 46 1

Hash (cost=3.74..3.74 rows=57 width=17) (actual time=9.435..9.435 rows=46 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
34. 0.015 9.429 ↑ 1.2 46 1

Hash Join (cost=2.01..3.74 rows=57 width=17) (actual time=9.418..9.429 rows=46 loops=1)

  • Hash Cond: (fac.affilate_id = fa_1.id)
35. 9.397 9.397 ↑ 1.0 57 1

Seq Scan on funnel_affiliates_cpa fac (cost=0.00..1.57 rows=57 width=16) (actual time=9.395..9.397 rows=57 loops=1)

36. 0.007 0.017 ↑ 1.0 45 1

Hash (cost=1.45..1.45 rows=45 width=9) (actual time=0.017..0.017 rows=45 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
37. 0.010 0.010 ↑ 1.0 45 1

Seq Scan on funnel_affiliates fa_1 (cost=0.00..1.45 rows=45 width=9) (actual time=0.004..0.010 rows=45 loops=1)

38. 0.001 188.867 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2_1 (cost=323.40..323.68 rows=2 width=353) (actual time=188.867..188.867 rows=0 loops=1)

39. 0.002 188.866 ↓ 0.0 0 1

WindowAgg (cost=323.40..323.66 rows=2 width=362) (actual time=188.866..188.866 rows=0 loops=1)

40. 0.001 188.864 ↓ 0.0 0 1

GroupAggregate (cost=323.40..323.55 rows=2 width=142) (actual time=188.864..188.864 rows=0 loops=1)

  • Group Key: a_1.product_group_id, rd_1.fid, (CASE WHEN ((rd_1.source_id)::text ~~* 'facebook'::text) THEN rd_1.medium_id ELSE NULL::character varying END), (count(rd_1.no_of_order)), (CASE WHEN ((rd_1.source_id)::text ~~* 'facebook'::text) THEN rd_1.country_id ELSE NULL::integer END), rd_1.is_affiliate_funnel, rd_1.active_funnel
41. 0.024 188.863 ↓ 0.0 0 1

Sort (cost=323.40..323.41 rows=2 width=86) (actual time=188.863..188.863 rows=0 loops=1)

  • Sort Key: a_1.product_group_id, rd_1.fid, (CASE WHEN ((rd_1.source_id)::text ~~* 'facebook'::text) THEN rd_1.medium_id ELSE NULL::character varying END), (count(rd_1.no_of_order)), (CASE WHEN ((rd_1.source_id)::text ~~* 'facebook'::text) THEN rd_1.country_id ELSE NULL::integer END), rd_1.is_affiliate_funnel, rd_1.active_funnel
  • Sort Method: quicksort Memory: 25kB
42. 0.002 188.839 ↓ 0.0 0 1

Merge Right Join (cost=289.58..323.39 rows=2 width=86) (actual time=188.839..188.839 rows=0 loops=1)

  • Merge Cond: (rd_1.product_group_id = a_1.product_group_id)
43. 12.968 168.650 ↑ 500.0 1 1

WindowAgg (cost=42.41..69.91 rows=500 width=134) (actual time=168.649..168.650 rows=1 loops=1)

44. 11.429 155.682 ↓ 90.3 45,136 1

GroupAggregate (cost=42.41..59.91 rows=500 width=90) (actual time=139.600..155.682 rows=45,136 loops=1)

  • Group Key: rd_1.product_group_id, rd_1.fid, rd_1.medium_id, rd_1.country_id, rd_1.is_affiliate_funnel, rd_1.source_id, rd_1.active_funnel, rd_1.no_of_order
45. 129.805 144.253 ↓ 90.3 45,136 1

Sort (cost=42.41..43.66 rows=500 width=82) (actual time=139.594..144.253 rows=45,136 loops=1)

  • Sort Key: rd_1.product_group_id, rd_1.fid, rd_1.medium_id, rd_1.country_id, rd_1.is_affiliate_funnel, rd_1.source_id, rd_1.active_funnel, rd_1.no_of_order
  • Sort Method: external merge Disk: 2040kB
46. 14.448 14.448 ↓ 90.3 45,136 1

CTE Scan on raw_data rd_1 (cost=0.00..20.00 rows=500 width=82) (actual time=0.011..14.448 rows=45,136 loops=1)

  • Filter: (NOT is_affiliate_funnel)
  • Rows Removed by Filter: 9864
47. 0.001 20.187 ↓ 0.0 0 1

GroupAggregate (cost=247.17..247.19 rows=1 width=36) (actual time=20.187..20.187 rows=0 loops=1)

  • Group Key: a_1.product_group_id
48. 0.008 20.186 ↓ 0.0 0 1

Sort (cost=247.17..247.17 rows=1 width=28) (actual time=20.186..20.186 rows=0 loops=1)

  • Sort Key: a_1.product_group_id
  • Sort Method: quicksort Memory: 25kB
49. 0.001 20.178 ↓ 0.0 0 1

Nested Loop (cost=0.00..247.16 rows=1 width=28) (actual time=20.178..20.178 rows=0 loops=1)

  • Join Filter: (fd.ad_account_id = a_1.id)
50. 20.177 20.177 ↓ 0.0 0 1

Seq Scan on facebook_ads_data fd (cost=0.00..242.82 rows=1 width=28) (actual time=20.177..20.177 rows=0 loops=1)

  • Filter: ((date >= '2019-11-06'::date) AND (date <= '2019-11-06'::date))
  • Rows Removed by Filter: 7388
51. 0.000 0.000 ↓ 0.0 0

Seq Scan on facebook_ads_account a_1 (cost=0.00..3.04 rows=104 width=8) (never executed)

52. 0.000 13.653 ↓ 0.0 0 1

Hash (cost=3,078.82..3,078.82 rows=1 width=49) (actual time=13.653..13.653 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
53. 0.001 13.653 ↓ 0.0 0 1

Subquery Scan on c (cost=3,078.78..3,078.82 rows=1 width=49) (actual time=13.653..13.653 rows=0 loops=1)

54. 0.001 13.652 ↓ 0.0 0 1

GroupAggregate (cost=3,078.78..3,078.81 rows=1 width=49) (actual time=13.652..13.652 rows=0 loops=1)

  • Group Key: fc.funnel_id, f2.active, fc.country_id, fc.source, fc.medium
55. 0.011 13.651 ↓ 0.0 0 1

Sort (cost=3,078.78..3,078.78 rows=1 width=41) (actual time=13.651..13.651 rows=0 loops=1)

  • Sort Key: fc.funnel_id, f2.active, fc.country_id, fc.source, fc.medium
  • Sort Method: quicksort Memory: 25kB
56. 0.000 13.640 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.00..3,078.77 rows=1 width=41) (actual time=13.640..13.640 rows=0 loops=1)

  • Join Filter: (fc.funnel_id = f2.id)
57. 13.640 13.640 ↓ 0.0 0 1

Seq Scan on funnel_unique_clicks fc (cost=0.00..3,055.85 rows=1 width=40) (actual time=13.640..13.640 rows=0 loops=1)

  • Filter: ((date >= '2019-11-06'::date) AND (date <= '2019-11-06'::date))
  • Rows Removed by Filter: 102523
58. 0.000 0.000 ↓ 0.0 0

Seq Scan on funnel_management f2 (cost=0.00..18.52 rows=352 width=5) (never executed)

59. 0.873 11.628 ↑ 1.0 352 51

Materialize (cost=0.00..20.28 rows=352 width=85) (actual time=0.200..0.228 rows=352 loops=51)

60. 10.755 10.755 ↑ 1.0 352 1

Seq Scan on funnel_management f (cost=0.00..18.52 rows=352 width=85) (actual time=10.170..10.755 rows=352 loops=1)

61. 0.000 17.535 ↓ 0.0 0 1

Hash (cost=16.75..16.75 rows=1 width=96) (actual time=17.535..17.535 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
62. 0.001 17.535 ↓ 0.0 0 1

Subquery Scan on tran (cost=16.72..16.75 rows=1 width=96) (actual time=17.535..17.535 rows=0 loops=1)

63. 0.001 17.534 ↓ 0.0 0 1

GroupAggregate (cost=16.72..16.74 rows=1 width=132) (actual time=17.534..17.534 rows=0 loops=1)

  • Group Key: f_1.name
64. 0.003 17.533 ↓ 0.0 0 1

Sort (cost=16.72..16.72 rows=1 width=52) (actual time=17.533..17.533 rows=0 loops=1)

  • Sort Key: f_1.name
  • Sort Method: quicksort Memory: 25kB
65. 0.001 17.530 ↓ 0.0 0 1

Nested Loop Left Join (cost=8.60..16.71 rows=1 width=52) (actual time=17.530..17.530 rows=0 loops=1)

66. 0.000 17.529 ↓ 0.0 0 1

GroupAggregate (cost=8.45..8.48 rows=1 width=29) (actual time=17.529..17.529 rows=0 loops=1)

  • Group Key: pt.funnel_id, pt.partner_id, pt.state
67. 0.003 17.529 ↓ 0.0 0 1

Sort (cost=8.45..8.46 rows=1 width=17) (actual time=17.529..17.529 rows=0 loops=1)

  • Sort Key: pt.funnel_id, pt.partner_id, pt.state
  • Sort Method: quicksort Memory: 25kB
68. 17.526 17.526 ↓ 0.0 0 1

Index Scan using payment_transaction_date_transaction_us_tz_index on payment_transaction pt (cost=0.42..8.44 rows=1 width=17) (actual time=17.526..17.526 rows=0 loops=1)

  • Index Cond: ((date_transaction_us_tz >= '2019-11-06'::date) AND (date_transaction_us_tz <= '2019-11-06'::date))
  • Filter: ((state)::text <> ALL ('{refunded,cancel}'::text[]))
69. 0.000 0.000 ↓ 0.0 0

Index Scan using funnel_management_pkey on funnel_management f_1 (cost=0.15..8.17 rows=1 width=40) (never executed)

  • Index Cond: (pt.funnel_id = id)
70. 0.001 0.816 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=282.73..282.77 rows=1 width=809) (actual time=0.815..0.816 rows=0 loops=1)

71. 0.001 0.815 ↓ 0.0 0 1

GroupAggregate (cost=282.73..282.76 rows=1 width=801) (actual time=0.815..0.815 rows=0 loops=1)

  • Group Key: a.product_group_id, brand.id, pg.name
72. 0.008 0.814 ↓ 0.0 0 1

Sort (cost=282.73..282.73 rows=1 width=55) (actual time=0.814..0.814 rows=0 loops=1)

  • Sort Key: a.product_group_id, brand.id, pg.name
  • Sort Method: quicksort Memory: 25kB
73. 0.000 0.806 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.00..282.72 rows=1 width=55) (actual time=0.806..0.806 rows=0 loops=1)

  • Join Filter: (brand.id = pg.product_brand_id)
74. 0.000 0.806 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.00..281.54 rows=1 width=46) (actual time=0.806..0.806 rows=0 loops=1)

  • Join Filter: (pg.id = a.product_group_id)
75. 0.001 0.806 ↓ 0.0 0 1

Nested Loop Anti Join (cost=0.00..279.66 rows=1 width=28) (actual time=0.805..0.806 rows=0 loops=1)

  • Join Filter: (a.product_group_id = rd_2.product_group_id)
76. 0.000 0.805 ↓ 0.0 0 1

Nested Loop (cost=0.00..247.16 rows=1 width=28) (actual time=0.805..0.805 rows=0 loops=1)

  • Join Filter: (fd_1.ad_account_id = a.id)
77. 0.805 0.805 ↓ 0.0 0 1

Seq Scan on facebook_ads_data fd_1 (cost=0.00..242.82 rows=1 width=28) (actual time=0.805..0.805 rows=0 loops=1)

  • Filter: ((date >= '2019-11-06'::date) AND (date <= '2019-11-06'::date))
  • Rows Removed by Filter: 7388
78. 0.000 0.000 ↓ 0.0 0

Seq Scan on facebook_ads_account a (cost=0.00..3.04 rows=104 width=8) (never executed)

79. 0.000 0.000 ↓ 0.0 0

CTE Scan on raw_data rd_2 (cost=0.00..20.00 rows=1,000 width=4) (never executed)

80. 0.000 0.000 ↓ 0.0 0

Seq Scan on product_group_ept pg (cost=0.00..1.39 rows=39 width=22) (never executed)

81. 0.000 0.000 ↓ 0.0 0

Seq Scan on product_brand_ept brand (cost=0.00..1.08 rows=8 width=13) (never executed)

82. 0.001 0.017 ↓ 0.0 0 1

Subquery Scan on *SELECT* 3 (cost=208.34..208.55 rows=6 width=850) (actual time=0.017..0.017 rows=0 loops=1)

83. 0.000 0.016 ↓ 0.0 0 1

GroupAggregate (cost=208.34..208.46 rows=6 width=880) (actual time=0.016..0.016 rows=0 loops=1)

  • Group Key: us2_1.name
84. 0.003 0.016 ↓ 0.0 0 1

Sort (cost=208.34..208.35 rows=6 width=18) (actual time=0.016..0.016 rows=0 loops=1)

  • Sort Key: us2_1.name
  • Sort Method: quicksort Memory: 25kB
85. 0.000 0.013 ↓ 0.0 0 1

Nested Loop Anti Join (cost=27.02..208.26 rows=6 width=18) (actual time=0.013..0.013 rows=0 loops=1)

  • Join Filter: (lower((rd_3.source_id)::text) ~~* lower((us2_1.name)::text))
86. 0.006 0.013 ↓ 0.0 0 1

Hash Join (cost=27.02..33.26 rows=6 width=18) (actual time=0.012..0.013 rows=0 loops=1)

  • Hash Cond: (us2_1.id = sc_1.utm_source_id)
87. 0.005 0.005 ↑ 231.0 1 1

Seq Scan on utm_source us2_1 (cost=0.00..5.31 rows=231 width=14) (actual time=0.005..0.005 rows=1 loops=1)

88. 0.000 0.002 ↓ 0.0 0 1

Hash (cost=26.95..26.95 rows=6 width=12) (actual time=0.002..0.002 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
89. 0.002 0.002 ↓ 0.0 0 1

Seq Scan on spend_channel sc_1 (cost=0.00..26.95 rows=6 width=12) (actual time=0.001..0.002 rows=0 loops=1)

  • Filter: ((spend_date >= '2019-11-06'::date) AND (spend_date <= '2019-11-06'::date))
90. 0.000 0.000 ↓ 0.0 0

CTE Scan on raw_data rd_3 (cost=0.00..20.00 rows=1,000 width=32) (never executed)

91. 0.001 34.043 ↓ 0.0 0 1

Subquery Scan on *SELECT* 4 (cost=435.56..435.62 rows=1 width=805) (actual time=34.043..34.043 rows=0 loops=1)

92. 0.001 34.042 ↓ 0.0 0 1

GroupAggregate (cost=435.56..435.60 rows=1 width=793) (actual time=34.042..34.042 rows=0 loops=1)

  • Group Key: f_2.id
93. 0.003 34.041 ↓ 0.0 0 1

Sort (cost=435.56..435.56 rows=1 width=84) (actual time=34.041..34.041 rows=0 loops=1)

  • Sort Key: f_2.id
  • Sort Method: quicksort Memory: 25kB
94. 0.001 34.038 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.15..435.55 rows=1 width=84) (actual time=34.038..34.038 rows=0 loops=1)

95. 34.037 34.037 ↓ 0.0 0 1

Seq Scan on payment_dispute pd (cost=0.00..427.33 rows=1 width=17) (actual time=34.037..34.037 rows=0 loops=1)

  • Filter: ((intial_purchase_date >= '2019-11-06'::date) AND (intial_purchase_date <= '2019-11-06'::date))
  • Rows Removed by Filter: 2689
96. 0.000 0.000 ↓ 0.0 0

Index Scan using funnel_management_pkey on funnel_management f_2 (cost=0.15..8.17 rows=1 width=71) (never executed)

  • Index Cond: (id = pd.funnel_id)
Planning time : 12.797 ms
Execution time : 319,662.350 ms