Slackbot
01/17/2023, 2:12 PMBen Krug
01/17/2023, 6:15 PMD K
01/18/2023, 5:44 AMHi @Ben Krug Dim is on the right-hand side of join. Also, i have modified the query as suggested with LOOKUP and there is a slight improvement in performance, and it takes 7 sec now. I have added additional context as well here like vectorize etc. Could you please review this once and suggest if anything else can be done?
D K
01/18/2023, 5:44 AM{
"query": "select LOOKUP(fe.product_id,'dim_prod_manf_desc') as manf_desc ,fe.sale_month,fe.sale_year,fe.sale_quarter,sum(fe.dist_total_revenue) from fact_extrapolated_revenue fe where __time >= TIME_PARSE ('2020-12-31T000000.000Z') AND __time < TIME_PARSE ('2022-11-30T000000.000Z') and fe.product_id IN (select dp.product_id from denorm_dim_product_unspsc dp where dp.taxonomy_id IN (41151519,41151519,42311502,42311506,42311510,42311513,42311515,42311523,42311527,42311540,42311545,42311546,42311547,42311552,42312005,42312103,42312105,42312313,42312401)) GROUP BY fe.product_id,fe.sale_month,fe.sale_year,fe.sale_quarter",
"context": {
"populateCache": *true*,
"useCache": *true*,
"vectorize": *true*,
"vectorSize": 512,
"forceLimitPushDown": *false*,
"enableParallelMerge": true
}}D K
01/18/2023, 11:37 AMBen Krug
01/20/2023, 9:09 PMD K
01/21/2023, 7:06 AMBen Krug
01/24/2023, 6:35 PM