Re: Purpose of BLOB datatype

2013-07-10 Thread Ollif Lee
fine, thanks. On Tue, Jul 9, 2013 at 11:24 PM, Pavel Kirienko pavel.kirienko.l...@gmail.com wrote: Do you know any direct ways in CQL to handle BLOB, just like DataStax Java driver? Well, CQL3 specification explicitly says that there is no way to encode blob into CQL request other than

Re: Purpose of BLOB datatype

2013-07-09 Thread Sylvain Lebresne
Pls explain why and how. Why and how what? Not encoding blobs into strings is the preferred way because that's obviously more efficient (in speed and space), since you don't do any encoding pass. As for how, use prepared statement was the how. What are the exact lines of code to use to do

Re: Purpose of BLOB datatype

2013-07-09 Thread Ollif Lee
Thank you for your patience. That is what I have expected. PS. Do you know any direct ways in CQL to handle BLOB, just like DataStax Java driver? On Tue, Jul 9, 2013 at 4:53 PM, Sylvain Lebresne sylv...@datastax.comwrote: Pls explain why and how. Why and how what? Not encoding blobs into

Re: Purpose of BLOB datatype

2013-07-09 Thread Pavel Kirienko
Do you know any direct ways in CQL to handle BLOB, just like DataStax Java driver? Well, CQL3 specification explicitly says that there is no way to encode blob into CQL request other than HEX string: http://cassandra.apache.org/doc/cql3/CQL.html#constants On Tue, Jul 9, 2013 at 6:40 PM, Ollif

Purpose of BLOB datatype

2013-07-08 Thread Pavel Kirienko
Hi all, I am curious why there is BLOB datatype that accepts HEX strings only. HEX encoding requires twice as much space as original data, thus it is rather ineffective. Instead, base64 encoding with ASCII datatype seems more effective in terms of space, and I believe it doesn't impose

Re: Purpose of BLOB datatype

2013-07-08 Thread Sylvain Lebresne
If you do have blobs, the preferred way is to not encode them in strings at all, but rather to use prepared statement (which don't involve a conversion to string). -- Sylvain On Mon, Jul 8, 2013 at 11:07 AM, Pavel Kirienko pavel.kirienko.l...@gmail.com wrote: Hi all, I am curious why there

Re: Purpose of BLOB datatype

2013-07-08 Thread Pavel Kirienko
If you do have blobs, the preferred way is to not encode them in strings at all, but rather to use prepared statement (which don't involve a conversion to string). Awesome. Thanks. On Mon, Jul 8, 2013 at 1:44 PM, Sylvain Lebresne sylv...@datastax.comwrote: If you do have blobs, the