I am pretty sure this would cut down on network traffic, but not on Disk
IO or CPU use.  I think Cassandra would still have to deserialize the
whole column to get to the name.  So if you really have a use case where
you just want the name, it would be better to store a separate "name
with no data" column.

________________________________

From: Patrick de Torcy [mailto:pdeto...@gmail.com] 
Sent: Wednesday, June 08, 2011 4:00 AM
To: user@cassandra.apache.org
Subject: Re: how to know there are some columns in a row


There is no reason for ambiguities...
We could add in the api another method call (similar to get_count) :



get_columnNames


*       list<string> get_columnNames(key, column_parent, predicate,
consistency_level) 

Get the columns names present in column_parent within the predicate. 

The method is not O(1). It takes all the columns from disk to calculate
the answer. The only benefit of the method is that you do not need to
pull all their values over Thrift interface to get their names



(just to get the idea...)

In fact column names can really be data in themselves, so there should
be a way to retrieve them (without their values). When you have big
values, it's a real show stopper to use get_slice, since a lot of
unnecessary traffic would be generated...

Forgive me if I am a little insistent, but it's important for us and I'm
sure we are not the only ones interested in this feature...

cheers

Reply via email to