incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleksandr Petrov <oleksandr.pet...@gmail.com>
Subject Using map<varchar, varchar> type with composite primary key causes significant performance decrease
Date Thu, 18 Apr 2013 16:43:10 GMT
Hi,

I'm trying to persist some event data, I've tried to identify the
bottleneck, and it seems to work like that:

If I create a table with primary key based on (application, environment,
type and emitted_at):

CREATE TABLE events (application varchar, environment varchar, type
varchar, additional_info map<varchar, varchar>, hostname varchar,
emitted_at timestamp,
*PRIMARY KEY (application, environment, type, emitted_at));*

And insert events via CQL, prepared statements:

INSERT INTO events (environment, application, hostname, emitted_at, type,
additional_info) VALUES (?, ?, ?, ?, ?, ?);

Values are: "local" "analytics" "noname" #inst
"2013-04-18T16:37:02.723-00:00" "event_type" {"some" "value"}

After about 1-2K inserts I get significant performance decrease.

I've tried using only emitted_at (timestamp) as a primary key, OR writing
additional_info data as a serialized JSON (varchar) instead of Map. Both
scenarios seem to solve the performance degradation.

I'm using Cassandra 1.2.3 from DataStax repository, running it on 2-core
machine with 2GB Ram.

What could I do wrong here? What may cause performance issues?..
Thank you


-- 
alex p

Mime
View raw message