{"action":"created","comment":{"url":"https://api.github.com/repos/openzipkin/zipkin/pulls/comments/44838681","id":44838681,"diff_hunk":"@@ -205,6 +220,28 @@ public Repository(String keyspace, Cluster cluster, Boolean ensureSchema) {\n                     .value(\"ts\", QueryBuilder.bindMarker(\"ts\"))\n                     .value(\"trace_id\", QueryBuilder.bindMarker(\"trace_id\"))\n                     .using(QueryBuilder.ttl(QueryBuilder.bindMarker(\"ttl_\"))));\n+\n+        selectTraceIdsBySpanDuration = session.prepare(\n+                QueryBuilder.select(\"d\", \"ts\", \"tid\")\n+                    .from(\"span_duration_index\")\n+                    .where(QueryBuilder.eq(\"s\", QueryBuilder.bindMarker(\"service_name\")))","path":"zipkin-cassandra-core/src/main/java/org/twitter/zipkin/storage/cassandra/Repository.java","position":56,"original_position":56,"commit_id":"2d7368c09a4fdf9be214756ac032806f89de5bfa","original_commit_id":"9308343d433b737faa8d924ca425caffe3b21345","user":{"login":"yurishkuro","id":3523016,"avatar_url":"https://avatars.githubusercontent.com/u/3523016?v=3","gravatar_id":"","url":"https://api.github.com/users/yurishkuro","html_url":"https://github.com/yurishkuro","followers_url":"https://api.github.com/users/yurishkuro/followers","following_url":"https://api.github.com/users/yurishkuro/following{/other_user}","gists_url":"https://api.github.com/users/yurishkuro/gists{/gist_id}","starred_url":"https://api.github.com/users/yurishkuro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yurishkuro/subscriptions","organizations_url":"https://api.github.com/users/yurishkuro/orgs","repos_url":"https://api.github.com/users/yurishkuro/repos","events_url":"https://api.github.com/users/yurishkuro/events{/privacy}","received_events_url":"https://api.github.com/users/yurishkuro/received_events","type":"User","site_admin":false},"body":"Yes, this was with compression. The schema is like below. Only the n(name) field would have longer strings, others are usually a single number, which become comparable in space usage to column names if those are fully spelled out.\r\n\r\nThe x5 size difference may not be directly attributed to column names, but that's the best measure they had. I don't know how much of intellectual burden short names really are, there are like 10 lines of code that depend on them. Taking extra disk space affects performance in various ways, in streaming, further compactions, etc.\r\n\r\nBut I am not strongly against changing this to long names.\r\n```\r\nCREATE TABLE events (\r\n  n text,\r\n  rt bigint,\r\n  t bigint,\r\n  v blob,\r\n  PRIMARY KEY ((n, rt), t)\r\n) WITH compression={'sstable_compression': 'LZ4Compressor'};\r\n```","created_at":"2015-11-13T21:53:51Z","updated_at":"2015-11-13T21:53:51Z","html_url":"https://github.com/openzipkin/zipkin/pull/844#discussion_r44838681","pull_request_url":"https://api.github.com/repos/openzipkin/zipkin/pulls/844","_links":{"self":{"href":"https://api.github.com/repos/openzipkin/zipkin/pulls/comments/44838681"},"html":{"href":"https://github.com/openzipkin/zipkin/pull/844#discussion_r44838681"},"pull_request":{"href":"https://api.github.com/repos/openzipkin/zipkin/pulls/844"}}},"pull_request":{"url":"https://api.github.com/repos/openzipkin/zipkin/pulls/844","id":50551875,"html_url":"https://github.com/openzipkin/zipkin/pull/844","diff_url":"https://github.com/openzipkin/zipkin/pull/844.diff","patch_url":"https://github.com/openzipkin/zipkin/pull/844.patch","issue_url":"https://api.github.com/repos/openzipkin/zipkin/issues/844","number":844,"state":"closed","locked":false,"title":"Support duration-based queries in Cassandra storage","user":{"login":"yurishkuro","id":3523016,"avatar_url":"https://avatars.githubusercontent.com/u/3523016?v=3","gravatar_id":"","url":"https://api.github.com/users/yurishkuro","html_url":"https://github.com/yurishkuro","followers_url":"https://api.github.com/users/yurishkuro/followers","following_url":"https://api.github.com/users/yurishkuro/following{/other_user}","gists_url":"https://api.github.com/users/yurishkuro/gists{/gist_id}","starred_url":"https://api.github.com/users/yurishkuro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yurishkuro/subscriptions","organizations_url":"https://api.github.com/users/yurishkuro/orgs","repos_url":"https://api.github.com/users/yurishkuro/repos","events_url":"https://api.github.com/users/yurishkuro/events{/privacy}","received_events_url":"https://api.github.com/users/yurishkuro/received_events","type":"User","site_admin":false},"body":"Complements https://github.com/openzipkin/zipkin/pull/820","created_at":"2015-11-12T18:57:00Z","updated_at":"2015-11-13T21:53:51Z","closed_at":"2015-11-12T23:08:43Z","merged_at":null,"merge_commit_sha":"968d92a5945ca4f3c2d6932ce47b63ed73241191","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openzipkin/zipkin/pulls/844/commits","review_comments_url":"https://api.github.com/repos/openzipkin/zipkin/pulls/844/comments","review_comment_url":"https://api.github.com/repos/openzipkin/zipkin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openzipkin/zipkin/issues/844/comments","statuses_url":"https://api.github.com/repos/openzipkin/zipkin/statuses/2d7368c09a4fdf9be214756ac032806f89de5bfa","head":{"label":"yurishkuro:master","ref":"master","sha":"2d7368c09a4fdf9be214756ac032806f89de5bfa","user":{"login":"yurishkuro","id":3523016,"avatar_url":"https://avatars.githubusercontent.com/u/3523016?v=3","gravatar_id":"","url":"https://api.github.com/users/yurishkuro","html_url":"https://github.com/yurishkuro","followers_url":"https://api.github.com/users/yurishkuro/followers","following_url":"https://api.github.com/users/yurishkuro/following{/other_user}","gists_url":"https://api.github.com/users/yurishkuro/gists{/gist_id}","starred_url":"https://api.github.com/users/yurishkuro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yurishkuro/subscriptions","organizations_url":"https://api.github.com/users/yurishkuro/orgs","repos_url":"https://api.github.com/users/yurishkuro/repos","events_url":"https://api.github.com/users/yurishkuro/events{/privacy}","received_events_url":"https://api.github.com/users/yurishkuro/received_events","type":"User","site_admin":false},"repo":{"id":43021265,"name":"zipkin","full_name":"yurishkuro/zipkin","owner":{"login":"yurishkuro","id":3523016,"avatar_url":"https://avatars.githubusercontent.com/u/3523016?v=3","gravatar_id":"","url":"https://api.github.com/users/yurishkuro","html_url":"https://github.com/yurishkuro","followers_url":"https://api.github.com/users/yurishkuro/followers","following_url":"https://api.github.com/users/yurishkuro/following{/other_user}","gists_url":"https://api.github.com/users/yurishkuro/gists{/gist_id}","starred_url":"https://api.github.com/users/yurishkuro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yurishkuro/subscriptions","organizations_url":"https://api.github.com/users/yurishkuro/orgs","repos_url":"https://api.github.com/users/yurishkuro/repos","events_url":"https://api.github.com/users/yurishkuro/events{/privacy}","received_events_url":"https://api.github.com/users/yurishkuro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yurishkuro/zipkin","description":"Zipkin is a distributed tracing system","fork":true,"url":"https://api.github.com/repos/yurishkuro/zipkin","forks_url":"https://api.github.com/repos/yurishkuro/zipkin/forks","keys_url":"https://api.github.com/repos/yurishkuro/zipkin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yurishkuro/zipkin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yurishkuro/zipkin/teams","hooks_url":"https://api.github.com/repos/yurishkuro/zipkin/hooks","issue_events_url":"https://api.github.com/repos/yurishkuro/zipkin/issues/events{/number}","events_url":"https://api.github.com/repos/yurishkuro/zipkin/events","assignees_url":"https://api.github.com/repos/yurishkuro/zipkin/assignees{/user}","branches_url":"https://api.github.com/repos/yurishkuro/zipkin/branches{/branch}","tags_url":"https://api.github.com/repos/yurishkuro/zipkin/tags","blobs_url":"https://api.github.com/repos/yurishkuro/zipkin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yurishkuro/zipkin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yurishkuro/zipkin/git/refs{/sha}","trees_url":"https://api.github.com/repos/yurishkuro/zipkin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yurishkuro/zipkin/statuses/{sha}","languages_url":"https://api.github.com/repos/yurishkuro/zipkin/languages","stargazers_url":"https://api.github.com/repos/yurishkuro/zipkin/stargazers","contributors_url":"https://api.github.com/repos/yurishkuro/zipkin/contributors","subscribers_url":"https://api.github.com/repos/yurishkuro/zipkin/subscribers","subscription_url":"https://api.github.com/repos/yurishkuro/zipkin/subscription","commits_url":"https://api.github.com/repos/yurishkuro/zipkin/commits{/sha}","git_commits_url":"https://api.github.com/repos/yurishkuro/zipkin/git/commits{/sha}","comments_url":"https://api.github.com/repos/yurishkuro/zipkin/comments{/number}","issue_comment_url":"https://api.github.com/repos/yurishkuro/zipkin/issues/comments{/number}","contents_url":"https://api.github.com/repos/yurishkuro/zipkin/contents/{+path}","compare_url":"https://api.github.com/repos/yurishkuro/zipkin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yurishkuro/zipkin/merges","archive_url":"https://api.github.com/repos/yurishkuro/zipkin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yurishkuro/zipkin/downloads","issues_url":"https://api.github.com/repos/yurishkuro/zipkin/issues{/number}","pulls_url":"https://api.github.com/repos/yurishkuro/zipkin/pulls{/number}","milestones_url":"https://api.github.com/repos/yurishkuro/zipkin/milestones{/number}","notifications_url":"https://api.github.com/repos/yurishkuro/zipkin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yurishkuro/zipkin/labels{/name}","releases_url":"https://api.github.com/repos/yurishkuro/zipkin/releases{/id}","created_at":"2015-09-23T19:10:23Z","updated_at":"2015-09-23T19:10:25Z","pushed_at":"2015-11-12T22:35:42Z","git_url":"git://github.com/yurishkuro/zipkin.git","ssh_url":"git@github.com:yurishkuro/zipkin.git","clone_url":"https://github.com/yurishkuro/zipkin.git","svn_url":"https://github.com/yurishkuro/zipkin","homepage":"http://zipkin.io","size":6706,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openzipkin:master","ref":"master","sha":"01fc67d367a32f10c2ec7a23e59b3ad49826e786","user":{"login":"openzipkin","id":11860887,"avatar_url":"https://avatars.githubusercontent.com/u/11860887?v=3","gravatar_id":"","url":"https://api.github.com/users/openzipkin","html_url":"https://github.com/openzipkin","followers_url":"https://api.github.com/users/openzipkin/followers","following_url":"https://api.github.com/users/openzipkin/following{/other_user}","gists_url":"https://api.github.com/users/openzipkin/gists{/gist_id}","starred_url":"https://api.github.com/users/openzipkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openzipkin/subscriptions","organizations_url":"https://api.github.com/users/openzipkin/orgs","repos_url":"https://api.github.com/users/openzipkin/repos","events_url":"https://api.github.com/users/openzipkin/events{/privacy}","received_events_url":"https://api.github.com/users/openzipkin/received_events","type":"Organization","site_admin":false},"repo":{"id":4576305,"name":"zipkin","full_name":"openzipkin/zipkin","owner":{"login":"openzipkin","id":11860887,"avatar_url":"https://avatars.githubusercontent.com/u/11860887?v=3","gravatar_id":"","url":"https://api.github.com/users/openzipkin","html_url":"https://github.com/openzipkin","followers_url":"https://api.github.com/users/openzipkin/followers","following_url":"https://api.github.com/users/openzipkin/following{/other_user}","gists_url":"https://api.github.com/users/openzipkin/gists{/gist_id}","starred_url":"https://api.github.com/users/openzipkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openzipkin/subscriptions","organizations_url":"https://api.github.com/users/openzipkin/orgs","repos_url":"https://api.github.com/users/openzipkin/repos","events_url":"https://api.github.com/users/openzipkin/events{/privacy}","received_events_url":"https://api.github.com/users/openzipkin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openzipkin/zipkin","description":"Zipkin is a distributed tracing system","fork":false,"url":"https://api.github.com/repos/openzipkin/zipkin","forks_url":"https://api.github.com/repos/openzipkin/zipkin/forks","keys_url":"https://api.github.com/repos/openzipkin/zipkin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openzipkin/zipkin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openzipkin/zipkin/teams","hooks_url":"https://api.github.com/repos/openzipkin/zipkin/hooks","issue_events_url":"https://api.github.com/repos/openzipkin/zipkin/issues/events{/number}","events_url":"https://api.github.com/repos/openzipkin/zipkin/events","assignees_url":"https://api.github.com/repos/openzipkin/zipkin/assignees{/user}","branches_url":"https://api.github.com/repos/openzipkin/zipkin/branches{/branch}","tags_url":"https://api.github.com/repos/openzipkin/zipkin/tags","blobs_url":"https://api.github.com/repos/openzipkin/zipkin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openzipkin/zipkin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openzipkin/zipkin/git/refs{/sha}","trees_url":"https://api.github.com/repos/openzipkin/zipkin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openzipkin/zipkin/statuses/{sha}","languages_url":"https://api.github.com/repos/openzipkin/zipkin/languages","stargazers_url":"https://api.github.com/repos/openzipkin/zipkin/stargazers","contributors_url":"https://api.github.com/repos/openzipkin/zipkin/contributors","subscribers_url":"https://api.github.com/repos/openzipkin/zipkin/subscribers","subscription_url":"https://api.github.com/repos/openzipkin/zipkin/subscription","commits_url":"https://api.github.com/repos/openzipkin/zipkin/commits{/sha}","git_commits_url":"https://api.github.com/repos/openzipkin/zipkin/git/commits{/sha}","comments_url":"https://api.github.com/repos/openzipkin/zipkin/comments{/number}","issue_comment_url":"https://api.github.com/repos/openzipkin/zipkin/issues/comments{/number}","contents_url":"https://api.github.com/repos/openzipkin/zipkin/contents/{+path}","compare_url":"https://api.github.com/repos/openzipkin/zipkin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openzipkin/zipkin/merges","archive_url":"https://api.github.com/repos/openzipkin/zipkin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openzipkin/zipkin/downloads","issues_url":"https://api.github.com/repos/openzipkin/zipkin/issues{/number}","pulls_url":"https://api.github.com/repos/openzipkin/zipkin/pulls{/number}","milestones_url":"https://api.github.com/repos/openzipkin/zipkin/milestones{/number}","notifications_url":"https://api.github.com/repos/openzipkin/zipkin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openzipkin/zipkin/labels{/name}","releases_url":"https://api.github.com/repos/openzipkin/zipkin/releases{/id}","created_at":"2012-06-06T18:26:16Z","updated_at":"2015-11-13T20:32:39Z","pushed_at":"2015-11-13T18:39:43Z","git_url":"git://github.com/openzipkin/zipkin.git","ssh_url":"git@github.com:openzipkin/zipkin.git","clone_url":"https://github.com/openzipkin/zipkin.git","svn_url":"https://github.com/openzipkin/zipkin","homepage":"http://zipkin.io","size":16784,"stargazers_count":2823,"watchers_count":2823,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":391,"mirror_url":null,"open_issues_count":83,"forks":391,"open_issues":83,"watchers":2823,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openzipkin/zipkin/pulls/844"},"html":{"href":"https://github.com/openzipkin/zipkin/pull/844"},"issue":{"href":"https://api.github.com/repos/openzipkin/zipkin/issues/844"},"comments":{"href":"https://api.github.com/repos/openzipkin/zipkin/issues/844/comments"},"review_comments":{"href":"https://api.github.com/repos/openzipkin/zipkin/pulls/844/comments"},"review_comment":{"href":"https://api.github.com/repos/openzipkin/zipkin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openzipkin/zipkin/pulls/844/commits"},"statuses":{"href":"https://api.github.com/repos/openzipkin/zipkin/statuses/2d7368c09a4fdf9be214756ac032806f89de5bfa"}}}}