简体   繁体   中英

Pandas sum vs. SQL sum

Is there a difference between pandas sum() function and SQL SUM(...) function. I'm using tables with around 100k rows. My current test runs were not good. The runtime was always different with both being not predictable (problem might be my bad wifi...) It will run on a server later, but maybe someone knows it already and I don't have to pay for my server now.

Thanks in advance!

It might be hard to get a clear answer without actual tests because it depends so much on what machines are used, what you are willing to pay for each part, ...

However, aggregating the data in SQL gives you less network traffic, which can be valuable a lot of the time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM