execute is faster than execute_async?

2019-12-11 Thread lampahome
I submit 1 row for 40960 times by session.execute() and session.execute_async() I found total time of execute() is always fast than execute_async Does that make sense? Or I miss the details of theri?

Re: execute is faster than execute_async?

2019-12-11 Thread lampahome
Jordan West 於 2019年12月11日 週三 下午4:34寫道: > Hi, > > Have you tried batching calls to execute_async with periodic blocking for > the batch’s responses? > Can you give me some keywords about calling execute_async batch? PS: I use python version.

How to know execute_async correctly?

2019-12-11 Thread lampahome
I tried to execute async by batch in python-driver. But I don't know how to check query executing correctly. Code is like below: B = BatchStatement() for x in xxx: B.add(query, (args)) res = session.execute_async(B) B.clear() # for reusing r = res.result() ## Then how to know my query works co

Re: execute is faster than execute_async?

2019-12-11 Thread lampahome
Jon Haddad 於 2019年12月12日 週四 上午12:42寫道: > I'm not sure how you're measuring this - could you share your benchmarking > code? > >> s the details of theri? >> > start = time.time() for i in range(40960): prep = session.prepare(query, (args)) session.execute(prep) # or session.execute_async(p

How to use cassandra of python better?

2019-12-12 Thread lampahome
As title, I want to utilize cassandra's advantages in maximum but I don't know how. So far, I know I can improve performance by execute_async and batchstatement. When I want more nodes scalability, just add server and modify some config files. Are there ways to help me use cassandra-python bette

PreparedStatement prepare what?

2019-12-13 Thread lampahome
I use cassandra-python driver and try to be familiar with preparedstatement to improve performance. I saw doc on datastax about it, but it doesn't describe detaily. Can anyone explain what does it prepare what? Will that help performance? thx

Is cassandra schemaless?

2019-12-15 Thread lampahome
I read some difference between nosql and sql, and one obvious differences is nosql supporting schemaless. But I try it in cassandra and get result not like that. Ex: cqlsh:key> Create table if not exists yo (blk bigint primary key, count int); cqlsh:key> insert into yo (blk, count, test) values (

How bottom of cassandra save data efficiently?

2019-12-30 Thread lampahome
If I use var a as primary key and var b as second key, and a and b are 16 bytes and 8 bytes. And other data are 32 bytes. In one row, I have a+b+data = 16+8+32 = 56 bytes. If I have 100,000 rows to store in cassandra, will it occupy space 56x10 bytes in my disk? Or data will be compressed?

Re: How bottom of cassandra save data efficiently?

2020-01-01 Thread lampahome
Dipan Shah 於 2019年12月31日 週二 下午5:34寫道: > Hello lampahome, > > Data will be compressed but you will also have to account for the > replication factor that you will be using. > > Thanks, > > Dipan Shah > > The key factor about efficiency is replication factor. Are there other factors?

Re: [EXTERNAL] Re: How bottom of cassandra save data efficiently?

2020-01-02 Thread lampahome
Thank you all. I found doc in datastax and it said the compression is default to enabled and set it as LZ4Compressor.