You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by buddhasystem <po...@bnl.gov> on 2011/02/19 04:56:31 UTC

Virtues and pitfall of using TYPES?

I've been too smart for my own good trying to type columns, on the theory
that it would later increase performance by having more efficient
comparators in place. So if a string represents an integer, I would convert
it to an integer and declare the column as such. Same for LONG.

What I found is that during the write operation, the type conversion kills
the performance. It's really not too trivial amount of time.

Has anyone had a similar experience?

-- 
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Virtues-and-pitfall-of-using-TYPES-tp6042432p6042432.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.

Re: Virtues and pitfall of using TYPES?

Posted by buddhasystem <po...@bnl.gov>.
Dude, I never mentioned the server side, sorry if it wasn't obvious.
As for python being slow, I'm not going away from it. It performs
amazingly well in other circumstances.


Jonathan Ellis-3 wrote:
> 
> That doesn't make sense to me.  IntegerType validation is a no-op and
> LongType validation is pretty close (just a size check).
> 
> If you meant that the conversion is killing performance on your
> client, you should switch to a more performant client language. :)
> 
> On Fri, Feb 18, 2011 at 9:56 PM, buddhasystem <po...@bnl.gov> wrote:
>>
>> I've been too smart for my own good trying to type columns, on the theory
>> that it would later increase performance by having more efficient
>> comparators in place. So if a string represents an integer, I would
>> convert
>> it to an integer and declare the column as such. Same for LONG.
>>
>> What I found is that during the write operation, the type conversion
>> kills
>> the performance. It's really not too trivial amount of time.
>>
>> Has anyone had a similar experience?
>>
>> --
>> View this message in context:
>> http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Virtues-and-pitfall-of-using-TYPES-tp6042432p6042432.html
>> Sent from the cassandra-user@incubator.apache.org mailing list archive at
>> Nabble.com.
>>
> 
> 
> 
> -- 
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
> 
> 

-- 
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Virtues-and-pitfall-of-using-TYPES-tp6042432p6042601.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.

Re: Virtues and pitfall of using TYPES?

Posted by Jonathan Ellis <jb...@gmail.com>.
That doesn't make sense to me.  IntegerType validation is a no-op and
LongType validation is pretty close (just a size check).

If you meant that the conversion is killing performance on your
client, you should switch to a more performant client language. :)

On Fri, Feb 18, 2011 at 9:56 PM, buddhasystem <po...@bnl.gov> wrote:
>
> I've been too smart for my own good trying to type columns, on the theory
> that it would later increase performance by having more efficient
> comparators in place. So if a string represents an integer, I would convert
> it to an integer and declare the column as such. Same for LONG.
>
> What I found is that during the write operation, the type conversion kills
> the performance. It's really not too trivial amount of time.
>
> Has anyone had a similar experience?
>
> --
> View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Virtues-and-pitfall-of-using-TYPES-tp6042432p6042432.html
> Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com