can't count rows in cqlsh , scylla 4.4.4

154 views
Skip to first unread message

Michael Wohlwend

<micha-1@fantasymail.de>
unread,
Sep 9, 2021, 5:38:50 AM9/9/21
to scylladb-users@googlegroups.com
Hi,

the subject says it:

when I isssue select count(1) from table even at consistency one (8 node
cluster), after 20 secs I get :

ReadTimeout: Error from server..... Operation timed out.. - received only 0
responses from 1....


The cluster isn't doing very much. How should I count?

Cheers
Michael




Benny Halevy

<bhalevy@scylladb.com>
unread,
Sep 9, 2021, 6:34:47 AM9/9/21
to scylladb-users@googlegroups.com
count() is running a full-scan query
that might take a long time.

You can run the query with a longer timeout using e.g.
"WITH TIMEOUT 120s"

Or change the range_request_timeout_in_ms config option.

Michael Wohlwend

<micha-1@fantasymail.de>
unread,
Sep 9, 2021, 9:35:26 AM9/9/21
to scylladb-users@googlegroups.com
Am Donnerstag, 9. September 2021, 12:34:42 CEST schrieb Benny Halevy:
> count() is running a full-scan query
> that might take a long time.

yes, I know, but if one needs it... :-)

> You can run the query with a longer timeout using e.g.
> "WITH TIMEOUT 120s"
>
> Or change the range_request_timeout_in_ms config option.


thanks, I'll look at this.

Cheers
Michael




Altan Özlü

<haldunkaracax@gmail.com>
unread,
Sep 11, 2021, 1:01:51 PM9/11/21
to ScyllaDB users
Hi Michael, 

It's splitting ranges and making parallel queries, you can't use it with cqlsh!



9 Eylül 2021 Perşembe tarihinde saat 12:38:50 UTC+3 itibarıyla micha-1 şunları yazdı:

Tomer Sandler

<tomer@scylladb.com>
unread,
Sep 11, 2021, 8:41:42 PM9/11/21
to scylladb-users@googlegroups.com
This example Atlan shared is based on this blog post that demonstrates parallel efficient full table scan, using golang code.


You can try using and adapting one of these scripts to your needs.

By our CTO explains the logic behind the parallel full scan.


--
Tomer Sandler
ScyllaDB

(Sent from my android)

--
You received this message because you are subscribed to the Google Groups "ScyllaDB users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scylladb-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scylladb-users/94c77e3d-a233-4752-96ac-29fa016fa085n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages