Build Cloud-Native apps with Apache Cassandra

GOT QUESTIONS from the Workshop? You're in the right place! Post a question here and we'll have answers.

Click here for Week 3 Materials and Homework.

Registrations still open!

question

David Jones-Gilardi avatar image
David Jones-Gilardi asked ·

How do I troubleshoot why a read is taking 600ms?

[This is a question I received from a user on our Discord channel. I gave some initial information which I will post here as well.]

Can someone help me on troubleshooting part of a select query. One select query is taking 600 ms, can someone tell me what all are the steps we can check and how to check --- why that particular select query execution is high?

cassandraperformanceslow query logging
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

David Jones-Gilardi avatar image
David Jones-Gilardi answered ·

Hi there. The first thing I would do is trace the query to see where it's taking the most time. If you are using DataStax Studio you can do this easily by clicking the drop down in the top right corner of your cell and choose a "TRACE" option which will give you a nice graphical breakdown like you see here.

If you're not using Studio you can always enable tracing at the CQLSH command line as well. Just a quick check though, are you using ALLOW FILTERING perchance?

User response:

I checked after using the tracing on its taking 5 ms ..
But in dynatrace it's showing more than that .

Not using allow filtering.

My response:

If your direct CQL trace is showing 5ms, but dynatrace is showing around 600ms it feels like there is something else slowing things down in the pipeline. How big is your payload? What other components is dynatrace taking into account? When it comes to the CQL query itself I would trust what the direct C* trace is saying.


Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.