英文:
Doing calculations in Snowflake VS. in Java
问题
In terms of performance, it is generally preferred to do the joins and aggregations in Snowflake rather than fetching the data and performing them in Java code.
英文:
Asummed I have several not big tables (thousands of records maximum, ~10 columns), and I need to join them and do more aggregations like count and group by; what is preferred, in terms of performance: doing the joins and aggregations in Snowflake, or fetching the data as is from Snowflake and doing the joins and aggregations in Java code?
答案1
得分: 2
假设您不需要在Java代码中进一步处理数据(以一种Snowflake无法实现的方式),并忽略您的问题中隐含的大量未知变量,那么在Snowflake中完成所有操作几乎肯定会表现更好 - Snowflake是专门设计用于处理您描述的方式的引擎;Java是一种通用编程语言。
英文:
Assuming that you don't need to further process the data in your Java code (in a way that is not possible in Snowflake) and ignoring the fact that there are a large number of unknown variables implicit in your question, then doing it all in Snowflake will almost certainly perform better - Snowflake is an engine specifically designed to process data in the way you've described; Java is a generic coding language
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论