在Snowflake和Java中进行计算。

huangapple go评论54阅读模式
英文:

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

huangapple
  • 本文由 发表于 2023年5月17日 17:00:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/76270299.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定