cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Haddad <...@jonhaddad.com>
Subject Re: execute is faster than execute_async?
Date Wed, 11 Dec 2019 16:15:18 GMT
I'm not sure how you're measuring this - could you share your benchmarking
code?

I ask because execute calls execute_async under the hood:
https://github.com/datastax/python-driver/blob/master/cassandra/cluster.py#L2316

I tested the python driver a ways back and found some weird behavior due to
the way it's non blocking code was implemented.  IIRC there were some sleep
calls thrown in there to get around Python's threading inadequacies.  I
can't remember if this code path is avoided when you use the execute() call.

Jon


On Wed, Dec 11, 2019 at 3:09 AM lampahome <pahome.chen@mirlab.org> wrote:

> I submit 1 row for 40960 times by session.execute() and
> session.execute_async()
>
> I found total time of execute() is always fast than execute_async
>
> Does that make sense? Or I miss the details of theri?
>

Mime
View raw message