Scylla: select count(*) from table not working

Created on 23 Apr 2018  Â·  9Comments  Â·  Source: scylladb/scylla

Hello

I have installed scylla db and when I do
select count(*) from abc
or count(*) or count(1) from table I get timeout errors. Rest queries do seem to work

Any suggestion?

Most helpful comment

The timeout you are getting is most likely from the client
If for example, you are using cqlsh, try using

cqlsh --request-timeout=2000

All 9 comments

Count goes over the entire table. You should increase your timeout in order
to wait for the answer which is
a function of the amount of data you have and cluster speed

On Mon, Apr 23, 2018 at 6:38 AM, alokgogate notifications@github.com
wrote:

Hello

I have installed scylla db and when I do count(*) or count(1) from table I
get timeout errors. Rest queries do seem to work

Any suggestion?

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/scylladb/scylla/issues/3378, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABp6RaQAOFwNg3QRJyLnG-q0tK7PBzcCks5trdlXgaJpZM4Tf6Zn
.

@alokgogate closing this since it's not a bug. Selecting over the entire DB and all nodes will take time.
As @dorlaor suggested, you can increase the client side timer, but it's a short-term solution. Running select count is an anti-pattern.
See #1385 for a possible enhancement to improve in this case.

@dorlaor @tzach can you please let us know which parameter should we change in scylla.yaml file so that we can get the output of the select query ?

The timeout you are getting is most likely from the client
If for example, you are using cqlsh, try using

cqlsh --request-timeout=2000

@tzach thanks for your quick response it really helped.

But shouldn't it be quick if I specify the partition key in WHERE statement? So far it's timing out as well.

How large is your partition?

@avikivity 1.6GB. I just opened #4484 for more details.

It's not possible to count 1.6GB worth of data in a few seconds on a single core. Increase your timeouts.

Was this page helpful?
0 / 5 - 0 ratings