Re: Global TTL vs Insert TTL

2017-02-02 Thread Romain Hardouin
Default TTL is nice to provide information on tables for ops guys. I mean we know that data in such tables are ephemeral at a glance. Le Mercredi 1 février 2017 21h47, Carlos Rolo a écrit : Awsome to know this! Thanks Jon and DuyHai! Regards, Carlos Juzarte RoloCassandra Consultant /

Re: Global TTL vs Insert TTL

2017-02-01 Thread Carlos Rolo
Awsome to know this! Thanks Jon and DuyHai! Regards, Carlos Juzarte Rolo Cassandra Consultant / Datastax Certified Architect / Cassandra MVP Pythian - Love your data rolo@pythian | Twitter: @cjrolo | Skype: cjr2k3 | Linkedin: *linkedin.com/in/carlosjuzarterolo

Re: Global TTL vs Insert TTL

2017-02-01 Thread Jonathan Haddad
The optimization is there. The entire sstable can be dropped but it's not because of the default TTL. The default TTL only applies if a TTL isn't specified explicitly. The default TTL can't be used to drop a table automatically since it can be overridden at insert time. Check out this example.

Re: Global TTL vs Insert TTL

2017-02-01 Thread DuyHai Doan
I was referring to this JIRA https://issues.apache.org/jira/browse/CASSANDRA-3974 when talking about dropping entire SSTable at compaction time But the JIRA is pretty old and it is very possible that the optimization is no longer there On Wed, Feb 1, 2017 at 6:53 PM, Jonathan Haddad wrote: >

Re: Global TTL vs Insert TTL

2017-02-01 Thread Jonathan Haddad
This is incorrect, there's no optimization used that references the table level TTL setting. The max local deletion time is stored in table metadata. See org.apache.cassandra.io.sstable.metadata.StatsMetadata#maxLocalDeletionTime in the Cassandra 3.0 branch.The default ttl is stored here: org

Re: Global TTL vs Insert TTL

2017-02-01 Thread DuyHai Doan
Global TTL is better than dynamic runtime TTL Why ? Because Global TTL is a table property and Cassandra can perform optimization when compacting. For example if it can see than the maxTimestamp of an SSTable is older than the table Global TTL, the SSTable can be entirely dropped during compact

Re: Global TTL vs Insert TTL

2017-02-01 Thread Cogumelos Maravilha
Thank you all, for your answers. On 02/01/2017 01:06 PM, Carlos Rolo wrote: > To reinforce Alain statement: > > "I would say that the unsafe part is more about using C* 3.9" this is > key. You would be better on 3.0.x unless you need features on the 3.x > series. > > Regards, > > Carlos Juzarte R

Re: Global TTL vs Insert TTL

2017-02-01 Thread Carlos Rolo
To reinforce Alain statement: "I would say that the unsafe part is more about using C* 3.9" this is key. You would be better on 3.0.x unless you need features on the 3.x series. Regards, Carlos Juzarte Rolo Cassandra Consultant / Datastax Certified Architect / Cassandra MVP Pythian - Love your

Re: Global TTL vs Insert TTL

2017-02-01 Thread Alain RODRIGUEZ
> > Is it safe to use TWCS in C* 3.9? I would say that the unsafe part is more about using C* 3.9 than using TWCS in C*3.9 :-). I see no reason to say 3.9 would be specifically unsafe in C*3.9, but I might be missing something. Going from STCS to TWCS is often smooth, from LCS you might expect a

Re: Global TTL vs Insert TTL

2017-01-31 Thread Cogumelos Maravilha
Hi Alain, Thanks for your response and the links. I've also checked "Time series data model and tombstones". Is it safe to use TWCS in C* 3.9? Thanks in advance. On 31-01-2017 11:27, Alain RODRIGUEZ wrote: > > Is there a overhead using line by line option or wasted disk space? > > There

Re: Global TTL vs Insert TTL

2017-01-31 Thread Alain RODRIGUEZ
> > Is there a overhead using line by line option or wasted disk space? > > There is a very recent topic about that in the mailing list, look for "Time series data model and tombstones". I believe DuyHai answer your question there with more details :). *tl;dr:* Yes, if you know the TTL in advanc

Global TTL vs Insert TTL

2017-01-31 Thread Cogumelos Maravilha
Hi I'm just wondering what option is fastest: Global:***create table xxx (.|AND |**|default_time_to_live = |**|XXX|**|;|**||and**UPDATE xxx USING TTL XXX;* Line by line: *INSERT INTO xxx (...USING TTL xxx;* Is there a overhead using line by line option or wasted disk space?