You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by David McNelis <dm...@gmail.com> on 2012/08/04 17:40:09 UTC

Secondary index impact on write performance

Morning,

Was reading up on secondary indexes and on the Datastax post about them, it
mentions the additional management overhead, and also that if you alter an
existing column family, that data will be updated in the background.  But
how do secondary indexes affect write performance?

If the answer is "it doesn't", then how do brand new records get located by
a subsequent indexed query?

If someone has a link to a post with some of this info, that would be
awesome.

David

Re: Secondary index impact on write performance

Posted by David McNelis <dm...@gmail.com>.
Thanks. That was what I expected, but wanted to confirm.
On Aug 4, 2012 11:24 AM, "Dave Brosius" <db...@mebigfatguy.com> wrote:

> There is a second (system managed) column family for each secondary index,
> so any write to a field that is indexed causes two writes, one to the main
> column family, and another to the index column family, where in this index
> column family the key is the value of the secondary column, and the value
> is the key of the original row.
>
>
>
> On 08/04/2012 11:40 AM, David McNelis wrote:
>
>> Morning,
>>
>> Was reading up on secondary indexes and on the Datastax post about them,
>> it mentions the additional management overhead, and also that if you alter
>> an existing column family, that data will be updated in the background.
>>  But how do secondary indexes affect write performance?
>>
>> If the answer is "it doesn't", then how do brand new records get located
>> by a subsequent indexed query?
>>
>> If someone has a link to a post with some of this info, that would be
>> awesome.
>>
>> David
>>
>
>

Re: Secondary index impact on write performance

Posted by Dave Brosius <db...@mebigfatguy.com>.
There is a second (system managed) column family for each secondary 
index, so any write to a field that is indexed causes two writes, one to 
the main column family, and another to the index column family, where in 
this index column family the key is the value of the secondary column, 
and the value is the key of the original row.



On 08/04/2012 11:40 AM, David McNelis wrote:
> Morning,
>
> Was reading up on secondary indexes and on the Datastax post about 
> them, it mentions the additional management overhead, and also that if 
> you alter an existing column family, that data will be updated in the 
> background.  But how do secondary indexes affect write performance?
>
> If the answer is "it doesn't", then how do brand new records get 
> located by a subsequent indexed query?
>
> If someone has a link to a post with some of this info, that would be 
> awesome.
>
> David