[
https://issues.apache.org/jira/browse/SPARK-35622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17363336#comment-17363336
]
dgd_contributor commented on SPARK-35622:
-----------------------------------------
Run a benchmark on my computer, df.rdd.count() execution time is 1/4 as
df.count().
I create a df with 10 rows and run 1000 loops and df.rdd.count() execution time
is 26715510000 nanoSecond, df.count() execution time is 116798269100 nanoSecond
> DataFrame's count function do not need groupBy and avoid shuffle
> ----------------------------------------------------------------
>
> Key: SPARK-35622
> URL: https://issues.apache.org/jira/browse/SPARK-35622
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 3.1.2
> Reporter: xiepengjie
> Priority: Major
>
> Use `df.rdd.count()` replace `df.count()`.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]