explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UrGo

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 12,481.781 ↑ 59,109.9 44 1

Append (cost=9,425,680.78..9,543,177.16 rows=2,600,836 width=120) (actual time=6,735.024..12,481.781 rows=44 loops=1)

2.          

CTE picklist_0

3. 0.323 0.323 ↑ 1.0 6 1

Seq Scan on t233_opportunitystagenamepicklistdim (cost=0.00..46.54 rows=6 width=4) (actual time=0.009..0.323 rows=6 loops=1)

  • Filter: (correlated_value = ANY ('{"06 - Won, Deploy & Expand","6 - Won, Deploy & Expand","Closed - Won","06 - Won. Deploy & Expand",Won,"06 - Won, Deploy & Expand"}'::text[]))
  • Rows Removed by Filter: 1225
4.          

CTE picklist_1

5. 0.296 0.296 ↑ 1.0 7 1

Seq Scan on t233_opportunitystagenamepicklistdim t233_opportunitystagenamepicklistdim_1 (cost=0.00..48.08 rows=7 width=4) (actual time=0.003..0.296 rows=7 loops=1)

  • Filter: (correlated_value = ANY ('{"HPE Not Pursued",Lost,Close:Duplicate,"HP Not Pursued",Duplicate,Error,"Closed - Lost"}'::text[]))
  • Rows Removed by Filter: 1224
6.          

CTE picklist_4

7. 0.456 0.456 ↑ 1.0 13 1

Seq Scan on t233_opportunitystagenamepicklistdim t233_opportunitystagenamepicklistdim_2 (cost=0.00..57.31 rows=13 width=4) (actual time=0.012..0.456 rows=13 loops=1)

  • Filter: (correlated_value = ANY ('{"06 - Won, Deploy & Expand",Lost,"6 - Won, Deploy & Expand",Close:Duplicate,"HP Not Pursued","06 - Won, Deploy & Expand",Error,"HPE Not Pursued","Closed - Won","06 - Won. Deploy & Expand",Won,Duplicate,"Closed - Lost"}'::text[]))
  • Rows Removed by Filter: 1218
8.          

CTE ownercte

9. 16.940 933.744 ↑ 3.0 8,167 1

HashAggregate (cost=430,763.15..431,007.52 rows=24,437 width=4) (actual time=932.688..933.744 rows=8,167 loops=1)

  • Group Key: distinctclosedateowner.ownerid
10. 59.922 916.804 ↑ 1.6 93,387 1

Hash Join (cost=397,065.69..430,388.78 rows=149,749 width=4) (actual time=786.529..916.804 rows=93,387 loops=1)

  • Hash Cond: (distinctclosedateowner.ownerid = t166_userrolehierarchy.sid)
11. 74.035 93.780 ↓ 1.3 196,760 1

Bitmap Heap Scan on distinctclosedateowner (cost=3,179.36..32,515.59 rows=149,749 width=4) (actual time=22.861..93.780 rows=196,760 loops=1)

  • Recheck Cond: ((closedate <= 20190131) AND (closedate >= 20181101))
  • Heap Blocks: exact=17913
12. 19.745 19.745 ↓ 1.3 196,760 1

Bitmap Index Scan on ix_closedate_distinctclosedateowner (cost=0.00..3,141.92 rows=149,749 width=0) (actual time=19.745..19.745 rows=196,760 loops=1)

  • Index Cond: ((closedate <= 20190131) AND (closedate >= 20181101))
13. 17.399 763.102 ↑ 1.6 120,794 1

Hash (cost=390,678.06..390,678.06 rows=195,541 width=4) (actual time=763.102..763.102 rows=120,794 loops=1)

  • Buckets: 131072 Batches: 4 Memory Usage: 2090kB
14. 15.375 745.703 ↑ 1.6 120,794 1

Unique (cost=384,259.38..390,678.06 rows=195,541 width=4) (actual time=715.018..745.703 rows=120,794 loops=1)

15. 69.039 730.328 ↑ 9.9 129,732 1

Sort (cost=384,259.38..387,468.72 rows=1,283,736 width=4) (actual time=715.016..730.328 rows=129,732 loops=1)

  • Sort Key: t166_userrolehierarchy.sid
  • Sort Method: external merge Disk: 1768kB
16. 200.616 661.289 ↑ 9.9 129,732 1

Hash Join (cost=59,693.23..236,459.56 rows=1,283,736 width=4) (actual time=153.934..661.289 rows=129,732 loops=1)

  • Hash Cond: (t166_userrolehierarchy.c662_user_role_id = t67_userroledim.sid)
17. 314.744 448.485 ↓ 1.0 1,322,102 1

Bitmap Heap Scan on t166_userrolehierarchy (cost=37,295.41..194,706.45 rows=1,283,736 width=8) (actual time=141.033..448.485 rows=1,322,102 loops=1)

  • Recheck Cond: ((c663_ancestor_role_id = ANY ('{436,247157}'::integer[])) AND (end_stamp = '32503680000000'::bigint))
  • Heap Blocks: exact=39380
18. 133.741 133.741 ↓ 1.0 1,325,198 1

Bitmap Index Scan on ix_t166_userrolehierarchy_ancestor_end_start_timestamp (cost=0.00..36,974.48 rows=1,283,736 width=0) (actual time=133.741..133.741 rows=1,325,198 loops=1)

  • Index Cond: ((c663_ancestor_role_id = ANY ('{436,247157}'::integer[])) AND (end_stamp = '32503680000000'::bigint))
19. 1.394 12.188 ↑ 9.3 8,370 1

Hash (cost=21,117.18..21,117.18 rows=78,051 width=4) (actual time=12.188..12.188 rows=8,370 loops=1)

  • Buckets: 131072 Batches: 2 Memory Usage: 1177kB
20. 6.238 10.794 ↑ 9.3 8,370 1

Bitmap Heap Scan on t67_userroledim (cost=4,261.99..21,117.18 rows=78,051 width=4) (actual time=5.032..10.794 rows=8,370 loops=1)

  • Recheck Cond: ((end_stamp = '32503680000000'::bigint) AND ((c377_portaltype IS NULL) OR (c377_portaltype = 'None'::text)))
  • Filter: ((NOT deleted) AND (sid <> '-2'::integer))
  • Rows Removed by Filter: 5610
  • Heap Blocks: exact=2143
21. 4.556 4.556 ↑ 5.6 14,010 1

Bitmap Index Scan on ix_t67_userroledim_sid_end_start_timestamp_partial (cost=0.00..4,242.48 rows=78,925 width=0) (actual time=4.556..4.556 rows=14,010 loops=1)

  • Index Cond: (end_stamp = '32503680000000'::bigint)
22.          

CTE bucketac

23. 137.883 6,996.716 ↑ 59,199.0 19 1

GroupAggregate (cost=4,100,835.71..4,154,262.81 rows=1,124,781 width=92) (actual time=6,734.995..6,996.716 rows=19 loops=1)

  • Group Key: t236_opp_line_item_fact.c820_opp_forecastcategory, (CASE WHEN (t236_opp_line_item_fact_1.sid IS NULL) THEN 'deleted'::text WHEN ((t236_opp_line_item_fact_1.c805_opp_close_date < 20181101) OR (t236_opp_line_item_fact_1.c805_opp_close_date > 20190131)) THEN 'slipped'::text WHEN (hashed SubPlan 5) THEN CASE WHEN (hashed SubPlan 6) THEN 'won'::text WHEN (hashed SubPlan 7) THEN 'lost'::text ELSE CASE WHEN (t234_opportunityforecastcategorypicklistdim_2.correlated_app_order = t234_opportunityforecastcategorypicklistdim_3.correlated_app_order) THEN 'unchanged'::text WHEN (t234_opportunityforecastcategorypicklistdim_2.correlated_app_order > t234_opportunityforecastcategorypicklistdim_3.correlated_app_order) THEN 'upgraded'::text ELSE 'downgraded'::text END END ELSE 'lostOwnership'::text END)
24. 334.012 6,858.833 ↑ 2.7 418,251 1

Sort (cost=4,100,285.58..4,103,097.54 rows=1,124,781 width=72) (actual time=6,734.617..6,858.833 rows=418,251 loops=1)

  • Sort Key: t236_opp_line_item_fact.c820_opp_forecastcategory, (CASE WHEN (t236_opp_line_item_fact_1.sid IS NULL) THEN 'deleted'::text WHEN ((t236_opp_line_item_fact_1.c805_opp_close_date < 20181101) OR (t236_opp_line_item_fact_1.c805_opp_close_date > 20190131)) THEN 'slipped'::text WHEN (hashed SubPlan 5) THEN CASE WHEN (hashed SubPlan 6) THEN 'won'::text WHEN (hashed SubPlan 7) THEN 'lost'::text ELSE CASE WHEN (t234_opportunityforecastcategorypicklistdim_2.correlated_app_order = t234_opportunityforecastcategorypicklistdim_3.correlated_app_order) THEN 'unchanged'::text WHEN (t234_opportunityforecastcategorypicklistdim_2.correlated_app_order > t234_opportunityforecastcategorypicklistdim_3.correlated_app_order) THEN 'upgraded'::text ELSE 'downgraded'::text END END ELSE 'lostOwnership'::text END)
  • Sort Method: external merge Disk: 26568kB
25. 251.273 6,524.821 ↑ 2.7 418,251 1

Hash Left Join (cost=3,830,871.46..3,894,964.27 rows=1,124,781 width=72) (actual time=5,981.362..6,524.821 rows=418,251 loops=1)

  • Hash Cond: (t236_opp_line_item_fact.c820_opp_forecastcategory = t234_opportunityforecastcategorypicklistdim_2.sid)
26. 97.826 6,272.301 ↑ 2.7 418,251 1

Merge Right Join (cost=3,830,301.66..3,859,763.97 rows=1,124,781 width=60) (actual time=5,981.332..6,272.301 rows=418,251 loops=1)

  • Merge Cond: ((cur177_t1_r1.rate_date = t236_opp_line_item_fact_1.c805_opp_close_date) AND (cur177_t1_r1.sid = t236_opp_line_item_fact_1.c821_opp_currency_code))
27. 7.383 69.937 ↑ 1.0 100,413 1

Merge Append (cost=0.31..8,292.46 rows=101,614 width=16) (actual time=0.020..69.937 rows=100,413 loops=1)

  • Sort Key: cur177_t1_r1.rate_date, cur177_t1_r1.sid
28. 0.004 0.005 ↓ 0.0 0 1

Sort (cost=0.01..0.02 rows=1 width=16) (actual time=0.005..0.005 rows=0 loops=1)

  • Sort Key: cur177_t1_r1.rate_date, cur177_t1_r1.sid
  • Sort Method: quicksort Memory: 25kB
29. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on clari_conversion_rate cur177_t1_r1 (cost=0.00..0.00 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: (to_iso_code = 'USD'::text)
30. 62.549 62.549 ↑ 1.0 100,413 1

Index Scan using ix_usd_clari_conversion_rate_date_isocode on usd_clari_conversion_rate cur177_t1_r1_1 (cost=0.29..7,022.26 rows=101,613 width=16) (actual time=0.015..62.549 rows=100,413 loops=1)

  • Filter: (to_iso_code = 'USD'::text)
31. 57.502 6,104.538 ↑ 2.3 418,251 1

Materialize (cost=3,828,923.30..3,833,636.24 rows=942,589 width=56) (actual time=5,939.910..6,104.538 rows=418,251 loops=1)

32. 304.396 6,047.036 ↑ 2.3 418,251 1

Sort (cost=3,828,923.30..3,831,279.77 rows=942,589 width=56) (actual time=5,939.908..6,047.036 rows=418,251 loops=1)

  • Sort Key: t236_opp_line_item_fact_1.c805_opp_close_date, t236_opp_line_item_fact_1.c821_opp_currency_code
  • Sort Method: external merge Disk: 30200kB
33. 88.893 5,742.640 ↑ 2.3 418,251 1

Merge Right Join (cost=3,645,061.67..3,670,953.92 rows=942,589 width=56) (actual time=5,501.239..5,742.640 rows=418,251 loops=1)

  • Merge Cond: ((cur177_t0_r0.rate_date = t236_opp_line_item_fact.c805_opp_close_date) AND (cur177_t0_r0.sid = t236_opp_line_item_fact.c821_opp_currency_code))
34. 4.782 44.633 ↑ 1.4 71,860 1

Merge Append (cost=0.31..8,292.46 rows=101,614 width=16) (actual time=0.026..44.633 rows=71,860 loops=1)

  • Sort Key: cur177_t0_r0.rate_date, cur177_t0_r0.sid
35. 0.019 0.020 ↓ 0.0 0 1

Sort (cost=0.01..0.02 rows=1 width=16) (actual time=0.020..0.020 rows=0 loops=1)

  • Sort Key: cur177_t0_r0.rate_date, cur177_t0_r0.sid
  • Sort Method: quicksort Memory: 25kB
36. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on clari_conversion_rate cur177_t0_r0 (cost=0.00..0.00 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: (to_iso_code = 'USD'::text)
37. 39.831 39.831 ↑ 1.4 71,860 1

Index Scan using ix_usd_clari_conversion_rate_date_isocode on usd_clari_conversion_rate cur177_t0_r0_1 (cost=0.29..7,022.26 rows=101,613 width=16) (actual time=0.006..39.831 rows=71,860 loops=1)

  • Filter: (to_iso_code = 'USD'::text)
38. 53.413 5,609.114 ↑ 1.9 418,251 1

Materialize (cost=3,643,683.31..3,647,632.85 rows=789,909 width=56) (actual time=5,454.932..5,609.114 rows=418,251 loops=1)

39. 342.997 5,555.701 ↑ 1.9 418,251 1

Sort (cost=3,643,683.31..3,645,658.08 rows=789,909 width=56) (actual time=5,454.927..5,555.701 rows=418,251 loops=1)

  • Sort Key: t236_opp_line_item_fact.c805_opp_close_date, t236_opp_line_item_fact.c821_opp_currency_code
  • Sort Method: external merge Disk: 30200kB
40. 106.977 5,212.704 ↑ 1.9 418,251 1

Hash Left Join (cost=888.46..3,512,308.48 rows=789,909 width=56) (actual time=938.026..5,212.704 rows=418,251 loops=1)

  • Hash Cond: (t236_opp_line_item_fact_1.c820_opp_forecastcategory = t234_opportunityforecastcategorypicklistdim_3.sid)
41. 129.497 5,105.720 ↑ 1.9 418,251 1

Nested Loop Left Join (cost=868.78..3,501,791.97 rows=789,909 width=56) (actual time=938.007..5,105.720 rows=418,251 loops=1)

42. 54.088 3,721.470 ↑ 1.9 418,251 1

Nested Loop (cost=868.22..848,661.61 rows=789,909 width=24) (actual time=937.994..3,721.470 rows=418,251 loops=1)

43. 4.289 939.604 ↓ 40.8 8,167 1

HashAggregate (cost=549.83..551.83 rows=200 width=4) (actual time=937.288..939.604 rows=8,167 loops=1)

  • Group Key: ownercte_1.c1
44. 935.315 935.315 ↑ 3.0 8,167 1

CTE Scan on ownercte ownercte_1 (cost=0.00..488.74 rows=24,437 width=4) (actual time=932.690..935.315 rows=8,167 loops=1)

45. 1,828.948 2,727.778 ↑ 2.7 51 8,167

Bitmap Heap Scan on t236_opp_line_item_fact (cost=318.38..4,239.18 rows=137 width=28) (actual time=0.189..0.334 rows=51 loops=8,167)

  • Recheck Cond: ((c804_opp_ownerid = ownercte_1.c1) AND (start_stamp <= '1541055600000'::bigint) AND (end_stamp > '1541055600000'::bigint))
  • Filter: ((NOT deleted) AND (c805_opp_close_date >= 20181101) AND (c805_opp_close_date <= 20190131) AND (NOT (hashed SubPlan 8)))
  • Rows Removed by Filter: 328
  • Heap Blocks: exact=813141
46. 898.370 898.370 ↑ 2.9 384 8,167

Bitmap Index Scan on t236_opp_line_item_fact_564_timestamp (cost=0.00..318.06 rows=1,096 width=0) (actual time=0.110..0.110 rows=384 loops=8,167)

  • Index Cond: ((c804_opp_ownerid = ownercte_1.c1) AND (start_stamp <= '1541055600000'::bigint) AND (end_stamp > '1541055600000'::bigint))
47.          

SubPlan (forBitmap Heap Scan)

48. 0.460 0.460 ↑ 1.0 13 1

CTE Scan on picklist_4 cte0_4 (cost=0.00..0.26 rows=13 width=4) (actual time=0.012..0.460 rows=13 loops=1)

49. 1,254.753 1,254.753 ↑ 1.0 1 418,251

Index Scan using ix_t236_opp_line_item_fact_sid_timestamp on t236_opp_line_item_fact t236_opp_line_item_fact_1 (cost=0.56..3.35 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=418,251)

  • Index Cond: ((t236_opp_line_item_fact.sid = sid) AND (t236_opp_line_item_fact.sid = sid) AND (start_stamp <= '1542009599999'::bigint) AND (end_stamp > '1542009599999'::bigint))
  • Filter: (NOT deleted)
50. 0.002 0.007 ↑ 86.0 5 1

Hash (cost=14.30..14.30 rows=430 width=8) (actual time=0.007..0.007 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
51. 0.005 0.005 ↑ 86.0 5 1

Seq Scan on t234_opportunityforecastcategorypicklistdim t234_opportunityforecastcategorypicklistdim_3 (cost=0.00..14.30 rows=430 width=8) (actual time=0.004..0.005 rows=5 loops=1)

52. 0.006 0.012 ↑ 86.0 5 1

Hash (cost=14.30..14.30 rows=430 width=8) (actual time=0.012..0.012 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
53. 0.006 0.006 ↑ 86.0 5 1

Seq Scan on t234_opportunityforecastcategorypicklistdim t234_opportunityforecastcategorypicklistdim_2 (cost=0.00..14.30 rows=430 width=8) (actual time=0.005..0.006 rows=5 loops=1)

54.          

SubPlan (forHash Left Join)

55. 0.613 0.613 ↑ 3.0 8,167 1

CTE Scan on ownercte (cost=0.00..488.74 rows=24,437 width=4) (actual time=0.001..0.613 rows=8,167 loops=1)

56. 0.324 0.324 ↑ 1.0 6 1

CTE Scan on picklist_0 cte0_2 (cost=0.00..0.12 rows=6 width=4) (actual time=0.009..0.324 rows=6 loops=1)

57. 0.298 0.298 ↑ 1.0 7 1

CTE Scan on picklist_1 cte0_3 (cost=0.00..0.14 rows=7 width=4) (actual time=0.004..0.298 rows=7 loops=1)

58.          

CTE bucketec

59. 21.105 5,484.939 ↑ 59,042.2 25 1

GroupAggregate (cost=4,777,506.50..4,840,238.84 rows=1,476,055 width=116) (actual time=5,450.184..5,484.939 rows=25 loops=1)

  • Group Key: (CASE WHEN (t236_opp_line_item_fact_3.sid IS NULL) THEN 'newBucket'::text WHEN (NOT (hashed SubPlan 10)) THEN CASE WHEN (t236_opp_line_item_fact_3.c805_opp_close_date > 20190131) THEN 'pulledInBucket'::text WHEN (t236_opp_line_item_fact_3.c805_opp_close_date < 20181101) THEN 'pushedInBucket'::text WHEN (hashed SubPlan 11) THEN 'otherBucket'::text ELSE 'gainedOwnershipBucket'::text END ELSE 'otherBucket'::text END), (CASE WHEN (hashed SubPlan 12) THEN 'won'::text WHEN (hashed SubPlan 13) THEN 'lost'::text ELSE 'newOpen'::text END), t236_opp_line_item_fact_2.c820_opp_forecastcategory
60. 147.193 5,463.834 ↑ 18.9 78,264 1

Sort (cost=4,776,956.08..4,780,646.22 rows=1,476,055 width=88) (actual time=5,450.167..5,463.834 rows=78,264 loops=1)

  • Sort Key: (CASE WHEN (t236_opp_line_item_fact_3.sid IS NULL) THEN 'newBucket'::text WHEN (NOT (hashed SubPlan 10)) THEN CASE WHEN (t236_opp_line_item_fact_3.c805_opp_close_date > 20190131) THEN 'pulledInBucket'::text WHEN (t236_opp_line_item_fact_3.c805_opp_close_date < 20181101) THEN 'pushedInBucket'::text WHEN (hashed SubPlan 11) THEN 'otherBucket'::text ELSE 'gainedOwnershipBucket'::text END ELSE 'otherBucket'::text END), (CASE WHEN (hashed SubPlan 12) THEN 'won'::text WHEN (hashed SubPlan 13) THEN 'lost'::text ELSE 'newOpen'::text END), t236_opp_line_item_fact_2.c820_opp_forecastcategory
  • Sort Method: external merge Disk: 4296kB
61. 39.566 5,316.641 ↑ 18.9 78,264 1

Merge Right Join (cost=4,425,956.41..4,484,442.78 rows=1,476,055 width=88) (actual time=5,259.708..5,316.641 rows=78,264 loops=1)

  • Merge Cond: ((cur177_t0_r0_2.rate_date = t236_opp_line_item_fact_2.c805_opp_close_date) AND (cur177_t0_r0_2.sid = t236_opp_line_item_fact_2.c821_opp_currency_code))
62. 4.578 45.086 ↑ 1.4 71,855 1

Merge Append (cost=0.31..8,292.46 rows=101,614 width=16) (actual time=0.026..45.086 rows=71,855 loops=1)

  • Sort Key: cur177_t0_r0_2.rate_date, cur177_t0_r0_2.sid
63. 0.006 0.008 ↓ 0.0 0 1

Sort (cost=0.01..0.02 rows=1 width=16) (actual time=0.008..0.008 rows=0 loops=1)

  • Sort Key: cur177_t0_r0_2.rate_date, cur177_t0_r0_2.sid
  • Sort Method: quicksort Memory: 25kB
64. 0.002 0.002 ↓ 0.0 0 1

Seq Scan on clari_conversion_rate cur177_t0_r0_2 (cost=0.00..0.00 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=1)

  • Filter: (to_iso_code = 'USD'::text)
65. 40.500 40.500 ↑ 1.4 71,855 1

Index Scan using ix_usd_clari_conversion_rate_date_isocode on usd_clari_conversion_rate cur177_t0_r0_3 (cost=0.29..7,022.26 rows=101,613 width=16) (actual time=0.017..40.500 rows=71,855 loops=1)

  • Filter: (to_iso_code = 'USD'::text)
66. 7.062 5,231.385 ↑ 15.8 78,264 1

Materialize (cost=4,424,027.63..4,430,212.45 rows=1,236,964 width=44) (actual time=5,212.589..5,231.385 rows=78,264 loops=1)

67. 89.603 5,224.323 ↑ 15.8 78,264 1

Sort (cost=4,424,027.63..4,427,120.04 rows=1,236,964 width=44) (actual time=5,212.588..5,224.323 rows=78,264 loops=1)

  • Sort Key: t236_opp_line_item_fact_2.c805_opp_close_date, t236_opp_line_item_fact_2.c821_opp_currency_code
  • Sort Method: external merge Disk: 3960kB
68. 111.293 5,134.720 ↑ 15.8 78,264 1

Nested Loop Left Join (cost=1,444.61..4,222,752.94 rows=1,236,964 width=44) (actual time=5.197..5,134.720 rows=78,264 loops=1)

  • Filter: ((t236_opp_line_item_fact_3.sid IS NULL) OR (t236_opp_line_item_fact_3.c805_opp_close_date < 20181101) OR (t236_opp_line_item_fact_3.c805_opp_close_date > 20190131) OR (NOT (hashed SubPlan 14)))
  • Rows Removed by Filter: 584449
69. 130.620 3,034.667 ↑ 2.3 662,713 1

Nested Loop (cost=894.22..834,114.53 rows=1,535,966 width=28) (actual time=2.564..3,034.667 rows=662,713 loops=1)

70. 4.175 4.762 ↓ 40.8 8,167 1

HashAggregate (cost=549.83..551.83 rows=200 width=4) (actual time=2.314..4.762 rows=8,167 loops=1)

  • Group Key: ownercte_4.c1
71. 0.587 0.587 ↑ 3.0 8,167 1

CTE Scan on ownercte ownercte_4 (cost=0.00..488.74 rows=24,437 width=4) (actual time=0.001..0.587 rows=8,167 loops=1)

72. 1,919.245 2,899.285 ↑ 3.3 81 8,167

Bitmap Heap Scan on t236_opp_line_item_fact t236_opp_line_item_fact_2 (cost=344.38..4,165.15 rows=266 width=32) (actual time=0.189..0.355 rows=81 loops=8,167)

  • Recheck Cond: ((c804_opp_ownerid = ownercte_4.c1) AND (start_stamp <= '1542009599999'::bigint) AND (end_stamp > '1542009599999'::bigint))
  • Filter: ((NOT deleted) AND (c805_opp_close_date >= 20181101) AND (c805_opp_close_date <= 20190131))
  • Rows Removed by Filter: 333
  • Heap Blocks: exact=876111
73. 980.040 980.040 ↑ 2.5 420 8,167

Bitmap Index Scan on t236_opp_line_item_fact_564_timestamp (cost=0.00..344.32 rows=1,066 width=0) (actual time=0.120..0.120 rows=420 loops=8,167)

  • Index Cond: ((c804_opp_ownerid = ownercte_4.c1) AND (start_stamp <= '1542009599999'::bigint) AND (end_stamp > '1542009599999'::bigint))
74. 1,988.139 1,988.139 ↑ 1.0 1 662,713

Index Scan using ix_t236_opp_line_item_fact_sid_timestamp on t236_opp_line_item_fact t236_opp_line_item_fact_3 (cost=0.56..2.19 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=662,713)

  • Index Cond: ((t236_opp_line_item_fact_2.sid = sid) AND (t236_opp_line_item_fact_2.sid = sid) AND (start_stamp <= '1541055600000'::bigint) AND (end_stamp > '1541055600000'::bigint))
  • Filter: (NOT deleted)
75.          

SubPlan (forNested Loop Left Join)

76. 0.621 0.621 ↑ 3.0 8,167 1

CTE Scan on ownercte ownercte_3 (cost=0.00..488.74 rows=24,437 width=4) (actual time=0.000..0.621 rows=8,167 loops=1)

77.          

SubPlan (forMerge Right Join)

78. 0.004 0.004 ↑ 1.0 13 1

CTE Scan on picklist_4 cte0_5 (cost=0.00..0.26 rows=13 width=4) (actual time=0.001..0.004 rows=13 loops=1)

79. 0.598 0.598 ↑ 3.0 8,167 1

CTE Scan on ownercte ownercte_2 (cost=0.00..488.74 rows=24,437 width=4) (actual time=0.001..0.598 rows=8,167 loops=1)

80. 0.001 0.001 ↑ 1.0 6 1

CTE Scan on picklist_0 cte0_6 (cost=0.00..0.12 rows=6 width=4) (actual time=0.000..0.001 rows=6 loops=1)

81. 0.001 0.001 ↑ 1.0 7 1

CTE Scan on picklist_1 cte0_7 (cost=0.00..0.14 rows=7 width=4) (actual time=0.001..0.001 rows=7 loops=1)

82. 0.022 6,996.769 ↑ 59,199.0 19 1

Hash Join (cost=19.68..37,981.03 rows=1,124,781 width=120) (actual time=6,735.024..6,996.769 rows=19 loops=1)

  • Hash Cond: (cte0.c4 = t234_opportunityforecastcategorypicklistdim.sid)
83. 6,996.732 6,996.732 ↑ 59,199.0 19 1

CTE Scan on bucketac cte0 (cost=0.00..22,495.62 rows=1,124,781 width=92) (actual time=6,734.998..6,996.732 rows=19 loops=1)

84. 0.006 0.015 ↑ 86.0 5 1

Hash (cost=14.30..14.30 rows=430 width=36) (actual time=0.015..0.015 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
85. 0.009 0.009 ↑ 86.0 5 1

Seq Scan on t234_opportunityforecastcategorypicklistdim (cost=0.00..14.30 rows=430 width=36) (actual time=0.008..0.009 rows=5 loops=1)

86. 0.017 5,485.005 ↑ 59,042.2 25 1

Subquery Scan on *SELECT* 2 (cost=19.68..68,287.22 rows=1,476,055 width=120) (actual time=5,450.218..5,485.005 rows=25 loops=1)

87. 0.019 5,484.988 ↑ 59,042.2 25 1

Hash Join (cost=19.68..49,836.53 rows=1,476,055 width=144) (actual time=5,450.210..5,484.988 rows=25 loops=1)

  • Hash Cond: (cte0_1.c6 = t234_opportunityforecastcategorypicklistdim_1.sid)
88. 5,484.957 5,484.957 ↑ 59,042.2 25 1

CTE Scan on bucketec cte0_1 (cost=0.00..29,521.10 rows=1,476,055 width=116) (actual time=5,450.187..5,484.957 rows=25 loops=1)

89. 0.006 0.012 ↑ 86.0 5 1

Hash (cost=14.30..14.30 rows=430 width=36) (actual time=0.012..0.012 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
90. 0.006 0.006 ↑ 86.0 5 1

Seq Scan on t234_opportunityforecastcategorypicklistdim t234_opportunityforecastcategorypicklistdim_1 (cost=0.00..14.30 rows=430 width=36) (actual time=0.006..0.006 rows=5 loops=1)