)]}'
{"files/vertica/mon_metrics_schema.sql":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"ba611f0a4b75c0224cbf49740a4d129911c00d27","unresolved":false,"context_lines":[{"line_number":39,"context_line":"CREATE PROJECTION Measurements_DBD_1_rep_MonMetrics /*+createtype(D)*/"},{"line_number":40,"context_line":"("},{"line_number":41,"context_line":" definition_dimensions_id ENCODING RLE,"},{"line_number":42,"context_line":" time_stamp ENCODING COMMONDELTA_COMP,"},{"line_number":43,"context_line":" value ENCODING AUTO,"},{"line_number":44,"context_line":" value_meta ENCODING RLE"},{"line_number":45,"context_line":")"}],"source_content_type":"text/x-sql","patch_set":1,"id":"fa32b979_dea2769a","line":42,"updated":"2015-06-20 13:59:19.000000000","message":"I\u0027m a little concerned about this change. I\u0027m wondering if we should keep the original, even though your query times are improved. \n\nThe Vertica documentation says,\n\nThis compression scheme builds a dictionary of all the deltas in the block and then stores indexes into the delta dictionary using entropy coding.\n\nThis scheme is ideal for sorted FLOAT and INTEGER-based (DATE/TIME/TIMESTAMP/INTERVAL) data columns with predictable sequences and only the occasional sequence breaks, such as timestamps recorded at periodic intervals or primary keys. For example, the following sequence compresses well: 300, 600, 900, 1200, 1500, 600, 1200, 1800, 2400. The following sequence does not compress well: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55.\n\nIf the delta distribution is excellent, columns can be stored in less than one bit per row. However, this scheme is very CPU intensive. If you use this scheme on data with arbitrary deltas, it can lead to significant data expansion.","commit_id":"4aa743a5af025982dce75b686b4f255d5ef85e92"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"ba611f0a4b75c0224cbf49740a4d129911c00d27","unresolved":false,"context_lines":[{"line_number":41,"context_line":" definition_dimensions_id ENCODING RLE,"},{"line_number":42,"context_line":" time_stamp ENCODING COMMONDELTA_COMP,"},{"line_number":43,"context_line":" value ENCODING AUTO,"},{"line_number":44,"context_line":" value_meta ENCODING RLE"},{"line_number":45,"context_line":")"},{"line_number":46,"context_line":"AS"},{"line_number":47,"context_line":" SELECT definition_dimensions_id,"}],"source_content_type":"text/x-sql","patch_set":1,"id":"fa32b979_be9bf271","line":44,"updated":"2015-06-20 13:59:19.000000000","message":"RLE for value_meta probably makes sense in most cases as it isn\u0027t changing very often. So, this change looks good to me.","commit_id":"4aa743a5af025982dce75b686b4f255d5ef85e92"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"ba611f0a4b75c0224cbf49740a4d129911c00d27","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        value_meta"},{"line_number":51,"context_line":" FROM MonMetrics.Measurements"},{"line_number":52,"context_line":" ORDER BY definition_dimensions_id,"},{"line_number":53,"context_line":"          value_meta"},{"line_number":54,"context_line":"SEGMENTED BY MODULARHASH (definition_dimensions_id) ALL NODES OFFSET 0;"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"CREATE PROJECTION Definitions_DBD_2_rep_MonMetrics /*+createtype(D)*/"}],"source_content_type":"text/x-sql","patch_set":1,"id":"fa32b979_5ea0a6a5","line":53,"updated":"2015-06-20 13:59:19.000000000","message":"Not sure why changing to order by value_meta would help at all. It isn\u0027t used in a query to filter or order on. It is just data that is returned with the metrics. It just seems incorrect to me.\n\nAlso, it seems like time_stamp should be kept. The time_stamp is used in many queries to order and filter on.\n\nBasically, all the time series queries are for a specific definition_dimensions_id over some time period. As in, give me the values for this metric over this range.","commit_id":"4aa743a5af025982dce75b686b4f255d5ef85e92"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"ba611f0a4b75c0224cbf49740a4d129911c00d27","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"CREATE PROJECTION Definitions_DBD_2_rep_MonMetrics /*+createtype(D)*/"},{"line_number":57,"context_line":"("},{"line_number":58,"context_line":" id ENCODING AUTO,"},{"line_number":59,"context_line":" name ENCODING AUTO,"},{"line_number":60,"context_line":" tenant_id ENCODING RLE,"},{"line_number":61,"context_line":" region ENCODING RLE"}],"source_content_type":"text/x-sql","patch_set":1,"id":"fa32b979_7e16caa8","line":58,"updated":"2015-06-20 13:59:19.000000000","message":"Makes sense. RLE on the id\u0027s is not going to help in this case.","commit_id":"4aa743a5af025982dce75b686b4f255d5ef85e92"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"ba611f0a4b75c0224cbf49740a4d129911c00d27","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        tenant_id,"},{"line_number":67,"context_line":"        region"},{"line_number":68,"context_line":" FROM MonMetrics.Definitions"},{"line_number":69,"context_line":" ORDER BY region,"},{"line_number":70,"context_line":"          tenant_id,"},{"line_number":71,"context_line":"          name"},{"line_number":72,"context_line":"UNSEGMENTED ALL NODES;"}],"source_content_type":"text/x-sql","patch_set":1,"id":"fa32b979_bea9b27d","line":69,"updated":"2015-06-20 13:59:19.000000000","message":"looks good","commit_id":"4aa743a5af025982dce75b686b4f255d5ef85e92"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"ba611f0a4b75c0224cbf49740a4d129911c00d27","unresolved":false,"context_lines":[{"line_number":74,"context_line":"CREATE PROJECTION Dimensions_DBD_3_rep_MonMetrics /*+createtype(D)*/"},{"line_number":75,"context_line":"("},{"line_number":76,"context_line":" dimension_set_id ENCODING AUTO,"},{"line_number":77,"context_line":" name ENCODING RLE,"},{"line_number":78,"context_line":" value ENCODING AUTO"},{"line_number":79,"context_line":")"},{"line_number":80,"context_line":"AS"}],"source_content_type":"text/x-sql","patch_set":1,"id":"fa32b979_1eaf7e7e","line":77,"updated":"2015-06-20 13:59:19.000000000","message":"So, the encoding of name will work well because you are ordered by name first in this projects.","commit_id":"4aa743a5af025982dce75b686b4f255d5ef85e92"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"ba611f0a4b75c0224cbf49740a4d129911c00d27","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        name,"},{"line_number":83,"context_line":"        value"},{"line_number":84,"context_line":" FROM MonMetrics.Dimensions"},{"line_number":85,"context_line":" ORDER BY name,"},{"line_number":86,"context_line":"          dimension_set_id,"},{"line_number":87,"context_line":"          value"},{"line_number":88,"context_line":"UNSEGMENTED ALL NODES;"}],"source_content_type":"text/x-sql","patch_set":1,"id":"fa32b979_bec0d22b","line":85,"updated":"2015-06-20 13:59:19.000000000","message":"This will work well because you are presumably mostly looking up the dimension_set_id given a name.","commit_id":"4aa743a5af025982dce75b686b4f255d5ef85e92"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"ba611f0a4b75c0224cbf49740a4d129911c00d27","unresolved":false,"context_lines":[{"line_number":90,"context_line":"CREATE PROJECTION DefinitionDimensions_DBD_4_rep_MonMetrics /*+createtype(D)*/"},{"line_number":91,"context_line":"("},{"line_number":92,"context_line":" id ENCODING AUTO,"},{"line_number":93,"context_line":" definition_id ENCODING RLE,"},{"line_number":94,"context_line":" dimension_set_id ENCODING AUTO"},{"line_number":95,"context_line":")"},{"line_number":96,"context_line":"AS"}],"source_content_type":"text/x-sql","patch_set":1,"id":"fa32b979_fecdfa5d","line":93,"updated":"2015-06-20 13:59:19.000000000","message":"This encoding makes sense. You have many id\u0027s, per definition_id\u0027s.","commit_id":"4aa743a5af025982dce75b686b4f255d5ef85e92"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"ba611f0a4b75c0224cbf49740a4d129911c00d27","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        dimension_set_id"},{"line_number":100,"context_line":" FROM MonMetrics.DefinitionDimensions"},{"line_number":101,"context_line":" ORDER BY definition_id,"},{"line_number":102,"context_line":"          dimension_set_id"},{"line_number":103,"context_line":"UNSEGMENTED ALL NODES;"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"select refresh(\u0027MonMetrics.Measurements, MonMetrics.Definitions, MonMetrics.Dimensions, MonMetrics.DefinitionDimensions\u0027);"}],"source_content_type":"text/x-sql","patch_set":1,"id":"fa32b979_1ee69ee8","line":102,"updated":"2015-06-20 13:59:19.000000000","message":"it makes sense that you removed id. There is only one id per definition_id and dimensions_set_id. It also makes sense that you order by definition_id, as there are many dimension_set_id\u0027s per definition_id.","commit_id":"4aa743a5af025982dce75b686b4f255d5ef85e92"}]}
