Stratio / cassandra-lucene-index

Lucene based secondary indexes for Cassandra
Apache License 2.0
600 stars 170 forks source link

High CPU on Query #367

Open phambryan opened 6 years ago

phambryan commented 6 years ago

After loading index into our Cassandra Cluster (7 nodes : 16 cores /32gb per node) with 10M rows.

On load testing of 100 req/s we're seeing 100% CPU on filter.

Is there any way to optimize Lucene Cassandra Index so it wouldn't peg our cluster ?

ealonsodb commented 6 years ago

Hi @phambryan:

Could you please show us the related filter query ?

phambryan commented 6 years ago

SELECT FROM users WHERE expr(users_index, '{ filter: { type: "wildcard", field: "food", value: "*tu\" } }');

The offending query is a double wildcard *term*; it seems that for Phrase is a better approach to lower CPU consumption.