You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Rakesh Kumar <dc...@aim.com> on 2016/03/01 22:54:13 UTC
Querying on index
Cassandra: 3.3
On my test system I create a table
create table eventinput
(
event_id varchar ,
event_class_cd int ,
event_ts timestamp ,
client_id varchar ,
event_message text ,
primary key ((client_id,event_id),event_ts)
)
I created an index on client_id
create index idx1 on eventinput(client_id);
When I query
select *
from eventinput
where client_id = 'aa'
ALLOW filtering ;
I get random results. One time it is 200, another time 400 or 500 or 600 and sometimes 0.
Why ?
Re: Querying on index
Posted by Jonathan Haddad <jo...@jonhaddad.com>.
That feels like a serious bug. Definitely file a JIRA with as many details
as possible. https://issues.apache.org/jira/browse/CASSANDRA/
On Tue, Mar 1, 2016 at 4:38 PM Rakesh Kumar <dc...@aim.com> wrote:
> Looks like Bloom filter size was the issue. Once I disabled it, the query
> returns rows correctly, but it was terrible slow (expected since it will
> hit SStable every time).
>
>
> -----Original Message-----
> From: Rakesh Kumar <dc...@aim.com>
> To: user <us...@cassandra.apache.org>
> Sent: Tue, Mar 1, 2016 4:57 pm
> Subject: Re: Querying on index
>
>
> At this time no one else is using this table. So the data is static.
>
> -----Original Message-----
> From: Rakesh Kumar
> To: user
> Sent: Tue, Mar 1, 2016 4:54 pm
> Subject: Querying on index
>
> Cassandra: 3.3On my test system I create a tablecreate table eventinput(
> event_id varchar , event_class_cd int , event_ts timestamp , client_id
> varchar , event_message text , primary key ((client_id,event_id),event_ts))
> I created an index on client_id create index idx1 on
> eventinput(client_id);When I query select *from eventinputwhere client_id =
> 'aa' ALLOW filtering ;I get random results. One time it is 200, another
> time 400 or 500 or 600 and sometimes 0.Why ?
>
RE: Querying on index
Posted by Amit Singh F <am...@ericsson.com>.
Hi Rakesh,
Default consistency level of client is set to 1, from your query it seems you are using CQL so could you try same query by setting CONSISTENCY ALL when you enter cqlsh.
Regards
Amit Singh
From: Rakesh Kumar [mailto:dcruncher4@aim.com]
Sent: Wednesday, March 02, 2016 3:25 AM
To: user@cassandra.apache.org
Subject: Re: Querying on index
At this time no one else is using this table. So the data is static.
-----Original Message-----
From: Rakesh Kumar
To: user
Sent: Tue, Mar 1, 2016 4:54 pm
Subject: Querying on index
Cassandra: 3.3On my test system I create a tablecreate table eventinput( event_id varchar , event_class_cd int , event_ts timestamp , client_id varchar , event_message text , primary key ((client_id,event_id),event_ts)) I created an index on client_id create index idx1 on eventinput(client_id);When I query select *from eventinputwhere client_id = 'aa' ALLOW filtering ;I get random results. One time it is 200, another time 400 or 500 or 600 and sometimes 0.Why ?
Re: Querying on index
Posted by Rakesh Kumar <dc...@aim.com>.
Looks like Bloom filter size was the issue. Once I disabled it, the query returns rows correctly, but it was terrible slow (expected since it will hit SStable every time).
-----Original Message-----
From: Rakesh Kumar <dc...@aim.com>
To: user <us...@cassandra.apache.org>
Sent: Tue, Mar 1, 2016 4:57 pm
Subject: Re: Querying on index
At this time no one else is using this table. So the data is static.
-----Original Message-----
From: Rakesh Kumar
To: user
Sent: Tue, Mar 1, 2016 4:54 pm
Subject: Querying on index
Cassandra: 3.3On my test system I create a tablecreate table eventinput( event_id varchar , event_class_cd int , event_ts timestamp , client_id varchar , event_message text , primary key ((client_id,event_id),event_ts)) I created an index on client_id create index idx1 on eventinput(client_id);When I query select *from eventinputwhere client_id = 'aa' ALLOW filtering ;I get random results. One time it is 200, another time 400 or 500 or 600 and sometimes 0.Why ?
Re: Querying on index
Posted by Rakesh Kumar <dc...@aim.com>.
At this time no one else is using this table. So the data is static.
-----Original Message-----
From: Rakesh Kumar
To: user
Sent: Tue, Mar 1, 2016 4:54 pm
Subject: Querying on index
Cassandra: 3.3On my test system I create a tablecreate table eventinput( event_id varchar , event_class_cd int , event_ts timestamp , client_id varchar , event_message text , primary key ((client_id,event_id),event_ts)) I created an index on client_id create index idx1 on eventinput(client_id);When I query select *from eventinputwhere client_id = 'aa' ALLOW filtering ;I get random results. One time it is 200, another time 400 or 500 or 600 and sometimes 0.Why ?