[
https://issues.apache.org/jira/browse/CASSANDRA-7523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14114249#comment-14114249
]
Joshua McKenzie commented on CASSANDRA-7523:
--------------------------------------------
Testing 2 tables w/mirrored inserts, compression enabled, 1 w/5 bigint per row
and 1 w/5 nanotime (6 byte underlying type) per row at 10M inserts (after
forced flush and major compaction to a single file):
{noformat}
12915616 timetest-longtest-ka-37-Filter.db
220440000 timetest-longtest-ka-37-Index.db
238827449 timetest-longtest-ka-37-Data.db
105230 timetest-longtest-ka-37-CompressionInfo.db
9991 timetest-longtest-ka-37-Statistics.db
1565712 timetest-longtest-ka-37-Summary.db
12230912 timetest-timetest-ka-35-Filter.db
200400000 timetest-timetest-ka-35-Index.db
236028269 timetest-timetest-ka-35-Data.db
92998 timetest-timetest-ka-35-CompressionInfo.db
9983 timetest-timetest-ka-35-Statistics.db
1409144 timetest-timetest-ka-35-Summary.db
452M longtest-b884c4c02ed811e4bd586fd6b0389ebc
430M timetest-b89d7ce02ed811e4bd586fd6b0389ebc
{noformat}
I expected compression to mostly remove the differential in size as 2 bytes
worth of the most significant bits in the long aren't used when serializing
nanos and it looks like that's the case. The only other justification I can
think of for using a custom 6-byte type is to save the 2 bytes on the wire per
record; I'm inclined to say that the added complexity both server and
client-side to handle a non-standard data type outweigh the potential benefit.
> add date and time types
> -----------------------
>
> Key: CASSANDRA-7523
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7523
> Project: Cassandra
> Issue Type: New Feature
> Components: API
> Reporter: Jonathan Ellis
> Assignee: Joshua McKenzie
> Priority: Minor
> Fix For: 2.1.1, 3.0
>
>
> http://www.postgresql.org/docs/9.1/static/datatype-datetime.html
> (we already have timestamp; interval is out of scope for now, and see
> CASSANDRA-6350 for discussion on timestamp-with-time-zone. but date/time
> should be pretty easy to add.)
--
This message was sent by Atlassian JIRA
(v6.2#6252)