PLANNED MAINTENANCE

Hello, DataStax Community!

We want to make you aware of a few operational updates which will be carried out on the site. We are working hard to streamline the login process to integrate with other DataStax resources. As such, you will soon be prompted to update your password. Please note that your username will remain the same.

As we work to improve your user experience, please be aware that login to the DataStax Community will be unavailable for a few hours on:

  • Wednesday, July 15 16:00 PDT | 19:00 EDT | 20:00 BRT
  • Thursday, July 16 00:00 BST | 01:00 CEST | 04:30 IST | 07:00 CST | 09:00 AEST

For more info, check out the FAQ page. Thank you for being a valued member of our community.


question

shanmugasundaram_179378 avatar image
shanmugasundaram_179378 asked ·

cassandra long running query

We are using cassandra-3.0.15. Few of the read queries takes longer time(>500ms). Based on the query tracing it seems the co-ordinator node takes longer time especially while starting to process the request. What could be the reason for that? How to solve this issue?

Have attached the query trace for one of the such requests below. It can be seen that the first activity "Executing single-partition query on facility_configuration" takes around 1.4sec. The rest of the activities are pretty fast.


activity | source | source_elapsed | thread

---------------------------------------------------------------------------+----------------+----------------+-------------------------------------------

Executing single-partition query on facility_configuration | node1 | 1466289 | SharedPool-Worker-6

Acquiring sstable references | node1 | 1466298 | SharedPool-Worker-6

Key cache hit for sstable 6 | node1 | 1466314 | SharedPool-Worker-6

Skipped 0/1 non-slice-intersecting sstables, included 0 due to tombstones | node1 | 1466330 | SharedPool-Worker-6

Merging data from memtables and 1 sstables | node1 | 1466341 | SharedPool-Worker-6

Read 1 live and 0 tombstone cells | node1 | 1466450 | SharedPool-Worker-6

reading digest from /node2 | node1 | 1466466 | SharedPool-Worker-6

Sending READ message to /node2 | node1 | 1467388 | MessagingService-Outgoing-/node2

READ message received from /node1 | node2 | 1 | MessagingService-Incoming-/node1

Executing single-partition query on facility_configuration | node2 | 536 | SharedPool-Worker-3

Acquiring sstable references | node2 | 546 | SharedPool-Worker-3

Key cache hit for sstable 6 | node2 | 562 | SharedPool-Worker-3

Skipped 0/1 non-slice-intersecting sstables, included 0 due to tombstones | node2 | 575 | SharedPool-Worker-3

Merging data from memtables and 1 sstables | node2 | 586 | SharedPool-Worker-3

Read 1 live and 0 tombstone cells | node2 | 642 | SharedPool-Worker-3

Read 1 live and 0 tombstone cells | node2 | 807 | SharedPool-Worker-3

Enqueuing response to /node1 | node2 | 819 | SharedPool-Worker-3

Sending REQUEST_RESPONSE message to /node1 | node2 | 845 | MessagingService-Outgoing-/node1

REQUEST_RESPONSE message received from /node2 | node1 | 1470583 | MessagingService-Incoming-/node2

Processing response from /node2 | node1 | 1470665 | SharedPool-Worker-15



session_id | client | command | coordinator | duration | parameters | request | started_at

--------------------------------------+--------------+---------+----------------+----------+--------------------------------------------------------------------------------------------+-----------------------------+--------------------------

ddef2100-eb53-11e9-86ed-9d59234ed651 | clientNode | QUERY | node1 | 1470765 | {'consistency_level': 'QUORUM', 'page_size': '5000', 'serial_consistency_level': 'SERIAL'} | Execute CQL3 prepared query | 2019-10-10 11:48:24+0000

cassandratimeout
7 comments
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.

@shanmugasundaram_179378 it's interesting that it's reading with SERIAL consistency. Can you post a sample query? Cheers!

0 Likes 0 · ·

it is a simple query . SELECT * FROM facility_configuration WHERE X1=?

0 Likes 0 · ·

But how did you set the consistency level?

0 Likes 0 · ·
Show more comments

it works from other clients as well. The above query tracing we have enabled it in production from our goland application. so it is not just cqlsh.

1 Like 1 · ·
Sergio avatar image Sergio shanmugasundaram_179378 ·

Oh great! Does it work well the go-cassandra driver? Which version are you using?

0 Likes 0 · ·

0 Answers