首页 文章 精选 留言 我的

精选列表

搜索[列存储],共10011篇文章
优秀的个人博客,低调大师

ES doc_values介绍——本质是field value的列存储,做聚合分析用,ES默认开启,会占用存储空间(列存储压缩技巧,除公共除...

doc_values Doc values are the on-disk data structure, built at document index time, which makes this data access pattern possible.They store the same values as the_sourcebut in a column-oriented fashion that is way more efficient for sorting and aggregations.(本质!!!)Doc values are supported on almost all field types, with thenotable exception ofanalyzedstring fields. All fields which support doc values have themenabled by default. If you are sure thatyou don’t need to sort or aggregate on a field, or access the field value from a script, you can disable doc values in order to save disk space: PUT my_index { "mappings": { "my_type": { "properties": { "status_code": { "type": "keyword" }, "session_id": { "type": "keyword", "doc_values": false } } } } } Thestatus_codefield hasdoc_valuesenabled by default. Thesession_idhasdoc_valuesdisabled, but can still be queried. 摘自:https://www.elastic.co/guide/en/elasticsearch/reference/current/doc-values.html Column-store compression edit At a high level, doc values are essentially a serializedcolumn-store. As we discussed in the last section, column-stores excel at certain operations because the data is naturally laid out in a fashion that is amenable to those queries. But they also excel at compressing data, particularly numbers. This is important for both saving space on diskandfor faster access. Modern CPU’s are many orders of magnitude faster than disk drives (although the gap is narrowing quickly with upcoming NVMe drives). That means it is often advantageous to minimize the amount of data that must be read from disk, even if it requires extra CPU cycles to decompress. To see how it can help compression, take this set of doc values for a numeric field: Doc Terms ----------------------------------------------------------------- Doc_1 | 100 Doc_2 | 1000 Doc_3 | 1500 Doc_4 | 1200 Doc_5 | 300 Doc_6 | 1900 Doc_7 | 4200 ----------------------------------------------------------------- Thecolumn-stride layout means we have a contiguous block of numbers:[100,1000,1500,1200,300,1900,4200]. xxx Doc values use several tricks like this. In order, the following compression schemes are checked: If all values are identical (or missing), set a flag and record the value If there are fewer than 256 values, a simple table encoding is used If there are > 256 values, check to see if there is a common divisor If there is no common divisor, encode everything as an offset from the smallest value You’ll note that these compression schemes are not "traditional" general purpose compression like DEFLATE or LZ4.Because the structure of column-stores are rigid and well-defined, we can achieve higher compression by using specialized schemes rather than the more general compression algorithms like LZ4. You may be thinking"Well that’s great for numbers, but what about strings?"Strings are encoded similarly, with the help of an ordinal table. The strings are de-duplicated and sorted into a table, assigned an ID, and then those ID’s are used as numeric doc values.Which means strings enjoy many of the same compression benefits that numerics do. The ordinal table itself has some compression tricks, such as using fixed, variable or prefix-encoded strings. 摘自:https://www.elastic.co/guide/en/elasticsearch/guide/current/_deep_dive_on_doc_values.html 本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/bonelee/p/6401466.html,如需转载请自行联系原作者

优秀的个人博客,低调大师

Lucene dvd dvm文件便是docvalues文件——就是针对field value的列存储

public final class Lucene54DocValuesFormat extends DocValuesFormat Lucene 5.4 DocValues format. Encodes the five per-document value types (Numeric,Binary,Sorted,SortedSet,SortedNumeric) with these strategies: NUMERIC: Delta-compressed: per-document integers written as deltas from the minimum value, compressed with bitpacking. For more information, seeDirectWriter. Table-compressed: when the number of unique values is very small (< 256), and when there are unused "gaps" in the range of values used (such asSmallFloat), a lookup table is written instead. Each per-document entry is instead the ordinal to this table, and those ordinals are compressed with bitpacking (DirectWriter). GCD-compressed: when all numbers share a common divisor, such as dates, the greatest common denominator (GCD) is computed, and quotients are stored using Delta-compressed Numerics. Monotonic-compressed: when all numbers are monotonically increasing offsets, they are written as blocks of bitpacked integers, encoding the deviation from the expected delta. Const-compressed: when there is only one possible non-missing value, only the missing bitset is encoded. Sparse-compressed: only documents with a value are stored, and lookups are performed using binary search. BINARY: Fixed-width Binary: one large concatenated byte[] is written, along with the fixed length. Each document's value can be addressed directly with multiplication (docID * length). Variable-width Binary: one large concatenated byte[] is written, along with end addresses for each document. The addresses are written as Monotonic-compressed numerics. Prefix-compressed Binary: values are written in chunks of 16, with the first value written completely and other values sharing prefixes. chunk addresses are written as Monotonic-compressed numerics. A reverse lookup index is written from a portion of every 1024th term. SORTED: Sorted: a mapping of ordinals to deduplicated terms is written as Binary, along with the per-document ordinals written using one of the numeric strategies above. SORTED_SET: Single: if all documents have 0 or 1 value, then data are written like SORTED. SortedSet table: when there are few unique sets of values (< 256) then each set is assigned an id, a lookup table is written and the mapping from document to set id is written using the numeric strategies above. SortedSet: a mapping of ordinals to deduplicated terms is written as Binary, an ordinal list and per-document index into this list are written using the numeric strategies above. SORTED_NUMERIC: Single: if all documents have 0 or 1 value, then data are written like NUMERIC. SortedSet table: when there are few unique sets of values (< 256) then each set is assigned an id, a lookup table is written and the mapping from document to set id is written using the numeric strategies above. SortedNumeric: a value list and per-document index into this list are written using the numeric strategies above. Files: .dvd: DocValues data .dvm: DocValues metadata 转自:http://lucene.apache.org/core/6_4_2/core/org/apache/lucene/codecs/lucene54/Lucene54DocValuesFormat.html 可以看到占用空间非常小!!! du -sm elasticsearch/nodes/0/indices/hec_test2/0/index/* 299 elasticsearch/nodes/0/indices/hec_test2/0/index/_e.fdt 1 elasticsearch/nodes/0/indices/hec_test2/0/index/_e.fdx 1 elasticsearch/nodes/0/indices/hec_test2/0/index/_e.fnm 148 elasticsearch/nodes/0/indices/hec_test2/0/index/_e_Lucene50_0.doc 130 elasticsearch/nodes/0/indices/hec_test2/0/index/_e_Lucene50_0.tim 5 elasticsearch/nodes/0/indices/hec_test2/0/index/_e_Lucene50_0.tip 1 elasticsearch/nodes/0/indices/hec_test2/0/index/_e_Lucene54_0.dvd 1 elasticsearch/nodes/0/indices/hec_test2/0/index/_e_Lucene54_0.dvm 1 elasticsearch/nodes/0/indices/hec_test2/0/index/_e.si 1 elasticsearch/nodes/0/indices/hec_test2/0/index/segments_7 0 elasticsearch/nodes/0/indices/hec_test2/0/index/write.lock 本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/bonelee/p/6669414.html,如需转载请自行联系原作者

优秀的个人博客,低调大师

NoSQL四种——kv存储(memcache,Riak),列存储(Cassandra,Hbase),文档类(mongoDB,CouchDB)...

见:https://software.intel.com/sites/default/files/Configuration_and_Deployment_Guide_for_Cassandra_on_IA.pdf NoSQL databases can be classified into four categories:Key-Value StoreThis is the most basic data model, where the data is storedas key-value pairs. Columnar Store:Similar to key-value store, data is stored as key-value pairs.However, each entry (referenced by a key) contains one or more key-valuepairs instead of a value. A columnar store is essentially a two dimensionalarray (Tezer, 2014a).Document-Oriented DatabaseThe fundamental concept is thedocument,which is a group of data with internal structure that can be defined arbitrarily. A document is referenced by a key and this allows documents to nestinside one another. Unlike in relational databases, the internal structure ofa document does not need to be predefined and can be changed anytime.While this makes storing data with complex or even ever-changing structure much easier, it also poses a challenge for querying as the complexitygrows. Graph Database:This uses graph structures to store data and thus, is mostsuitable for heavily linked data that can be best represented in graphs。 见:http://edoc.sub.uni-hamburg.de/haw/volltexte/2016/3578/pdf/Thesis.pdf 里面介绍了如何去实现一个高性能的kv数据库,嵌入式的,参考了levelDB和LMDB等。 本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/bonelee/p/6322489.html ,如需转载请自行联系原作者

资源下载

更多资源
腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册