On 11/06/2011 02:27, [email protected] wrote:
I'm trying to understand why doing the inserts into a column family with
indexes seems to jam things up and am wondering if there are any settings that
I could tweak to help. It seems that the 4 node cluster should be able to
handle 2 threads of data coming at it. Has anyone had any experience with this
number of indexes per column family? Any insight or suggestions would be
appreciated.
Hi,
I used to post an email about this, see the mail list archive.
The secondary index now use hash method, and it causes an random I/O
when do insertion(so lots of swap work). Also, the query based on it
would be slow too.
So my advice would be : don't use the secondary index, at least for now
(there are plans to build an bitmap index [1])
You can try Ed Uff 's method [2] to build an CF as your index, it's much
faster than the secondary index. (this method may need the CompositeType
[3])
[1] https://issues.apache.org/jira/browse/CASSANDRA-1472
[2] http://www.anuff.com/2010/07/secondary-indexes-in-cassandra.html
[3] https://issues.apache.org/jira/browse/CASSANDRA-2231
--
Donal Zang
Computing Center, IHEP
19B YuquanLu, Shijingshan District,Beijing, 100049
[email protected]
86 010 8823 6018