cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Leão <igor.l...@ubee.in>
Subject Re: Logging queries
Date Sat, 18 Feb 2017 20:54:19 GMT
Thanks Bhuvan!

Matija, I'm looking forward to this new release. Cassandra-diagnostics is
just great and this feature will make it awesome.
Hope to hear from you soon.

2017-02-18 17:20 GMT-03:00 Bhuvan Rawal <bhu1rawal@gmail.com>:

> Im not sure if you can create an index on system_traces keyspace for this
> use case.
>
> If the performance issue that you are trying to troubleshoot is consistent
> than you can switch on tracing for a while and do dump of
> system_traces.events table say using COPY into csv. You can do analysis on
> that for finding the problematic query.
>
> copy system_traces.events TO 'traces_dump.csv';
>
> Also do make sure you dont set trace probability to a high number if
> working on a production database as it can adversely impact performance.
>
> Regards,
>
> On Sun, Feb 19, 2017 at 1:28 AM, Igor Leão <igor.leao@ubee.in> wrote:
>
>> Hi Bhuvan,
>> Thanks a lot!
>>
>> Any idea if something can be done for C* 2.X?
>>
>> Best,
>> Igor
>>
>> 2017-02-18 16:41 GMT-03:00 Bhuvan Rawal <bhu1rawal@gmail.com>:
>>
>>> Hi Igor,
>>>
>>> If you are using java driver, you can log slow queries on client side
>>> using QueryLogger.
>>> https://docs.datastax.com/en/developer/java-driver/2.1/manual/logging/
>>>
>>> Slow Query logger for server was introduced in C* 3.10 version. Details:
>>> https://issues.apache.org/jira/browse/CASSANDRA-12403
>>>
>>> Regards,
>>> Bhuvan
>>>
>>> On Sun, Feb 19, 2017 at 12:59 AM, Igor Leão <igor.leao@ubee.in> wrote:
>>>
>>>> Hi there,
>>>>
>>>> I'm wondering how to log queries from Cassandra. These queries can be
>>>> either slow queries or all queries. The only constraint is that I should
do
>>>> this on server side.
>>>>
>>>> I tried using `nodetool settraceprobability`, which writes all queries
>>>> to the keyspace `system_traces`. When I try to see which queries are slower
>>>> than a given number, I get:
>>>>
>>>> Result: ```InvalidRequest: code=2200 [Invalid query] message="No
>>>> secondary indexes on the restricted columns support the provided operators:
>>>> "```
>>>> Query: `select * from events where source_elapsed >= 1000;`
>>>>
>>>> My goal is to debug performance issues in a production database. I want
>>>> to know which queries are degrading the performance of the db.
>>>>
>>>> Thanks in advance!
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>> --
>> Igor Leão  Site Reliability Engineer
>>
>> Mobile: +55 81 99727-1083 <callto://+5581997271083>
>> Skype: *igorvpcleao*
>> Office: +55 81 4042-9757 <callto://+558140429757>
>> Website: inlocomedia.com <http://www.inlocomedia.com/>
>> [image: inlocomedia]
>> <http://t.sidekickopen29.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XX45w6CwnN7dSpvzQZpw8W8pTc_456dVQFdQm8LT02?t=http%3A%2F%2Fwww.inlocomedia.com%2F&si=4991638468296704&pi=9266b53b-57c9-4b38-d81a-d2f8f01ed355>
>>  [image: LinkedIn]
>> <http://t.sidekickopen29.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XX45w6CwnN7dSpvzQZpw8W8pTc_456dVQFdQm8LT02?t=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fin-loco-media&si=4991638468296704&pi=9266b53b-57c9-4b38-d81a-d2f8f01ed355>
>>  [image: Facebook] <https://www.facebook.com/inlocomedia> [image:
>> Twitter]
>> <http://t.sidekickopen29.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XX45w6CwnN7dSpvzQZpw8W8pTc_456dVQFdQm8LT02?t=https%3A%2F%2Ftwitter.com%2Finlocomedia&si=4991638468296704&pi=9266b53b-57c9-4b38-d81a-d2f8f01ed355>
>>
>>
>>
>>
>>
>>
>>
>


-- 
Igor Leão  Site Reliability Engineer

Mobile: +55 81 99727-1083 <callto://+5581997271083>
Skype: *igorvpcleao*
Office: +55 81 4042-9757 <callto://+558140429757>
Website: inlocomedia.com <http://www.inlocomedia.com/>
[image: inlocomedia]
<http://t.sidekickopen29.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XX45w6CwnN7dSpvzQZpw8W8pTc_456dVQFdQm8LT02?t=http%3A%2F%2Fwww.inlocomedia.com%2F&si=4991638468296704&pi=9266b53b-57c9-4b38-d81a-d2f8f01ed355>
 [image: LinkedIn]
<http://t.sidekickopen29.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XX45w6CwnN7dSpvzQZpw8W8pTc_456dVQFdQm8LT02?t=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fin-loco-media&si=4991638468296704&pi=9266b53b-57c9-4b38-d81a-d2f8f01ed355>
 [image: Facebook] <https://www.facebook.com/inlocomedia> [image: Twitter]
<http://t.sidekickopen29.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XX45w6CwnN7dSpvzQZpw8W8pTc_456dVQFdQm8LT02?t=https%3A%2F%2Ftwitter.com%2Finlocomedia&si=4991638468296704&pi=9266b53b-57c9-4b38-d81a-d2f8f01ed355>

Mime
View raw message