当前位置: 首页 > news >正文

用eclipse做jsp网站jsp网站开发详解 下载

用eclipse做jsp网站,jsp网站开发详解 下载,设计网站有没有版权,WordPress迁移网站打不开文章目录 存储格式介绍 一、格式 二、使用建议 三、技术原理 1、列存 2、行存 3、行列共存 四、使用示例 存储格式介绍 一、格式 在Hologres中支持行存、列存和行列共存三种存储格式#xff0c;不同的存储格式适用于不同的场景。在建表时通过设置orientation属性指… 文章目录 存储格式介绍 一、格式 二、使用建议 三、技术原理 1、列存 2、行存 3、行列共存 四、使用示例  存储格式介绍 一、格式 在Hologres中支持行存、列存和行列共存三种存储格式不同的存储格式适用于不同的场景。在建表时通过设置orientation属性指定表的存储格式语法如下 -- 2.1版本起支持 CREATE TABLE table_name (...) WITH (orientation [column | row | row,column]);-- 所有版本支持 BEGIN; CREATE TABLE table_name (...); call set_table_property(table_name, orientation, [column | row | row,column]); COMMIT;注意事项 orientation指定了数据库表在Hologres中的存储模式是列存还是行存Hologres从 V1.1版本开始支持行列共存的模式。建表时默认为列存column storage形式。行存或行列共存需要在建表时显式指定。修改表的存储格式需要重新建表不能直接转换。 二、使用建议 表的存储模式使用建议如下 三、技术原理 1、列存 begin; create table public.tbl_col ( id text NOT NULL, name text NOT NULL, class text NOT NULL, in_time TIMESTAMPTZ NOT NULL, PRIMARY KEY (id) ); call set_table_property(public.tbl_col, orientation, column); call set_table_property(public.tbl_col, clustering_key, class); call set_table_property(public.tbl_col, bitmap_columns, name); call set_table_property(public.tbl_col, event_time_column, in_time); commit; select * from public.tbl_col where id 3333; select id, class,name from public.tbl_col where id 3333 order by id;示意图如下图 2、行存 如果Hologres的表设置的是行存那么数据将会按照行存储。行存默认使用SST格式数据按照Key有序分块压缩存储并且通过Block Index、Bloom Filter等索引以及后台Compaction机制对文件进行整理优化点查查询效率。 PK和Clustering Key一致  系统会为每张表在底层存储一个主键索引文件详情请参见主键Primary Key。行存表设置了Primary KeyPK的场景系统会自动生成一个Row IdentifierRIDRID用于定位整行数据同时系统也会将PK设置为Distribution Key和Clustering Key这样就能快速定位到数据所在的Shard和文件在基于主键查询的场景上只需要扫描一个主键就能快速拿到所有列的全行数据提升查询效率。 PK和Clustering Key不一致 如果在建表时设置表为行存表且将PK和Clustering Key设置为不同的字段查询时系统会根据PK定位到Clustering Key和RID再通过Clustering Key和RID快速定位到全行数据相当于扫描了两次有一定的性能牺牲。 推荐设置主键Primary Key begin; create table public.tbl_row (id text NOT NULL,name text NOT NULL,class text , PRIMARY KEY (id) ); call set_table_property(public.tbl_row, orientation, row); call set_table_property(public.tbl_row, clustering_key, id); call set_table_property(public.tbl_row, distribution_key, id); commit;--基于PK的点查示例 select * from public.tbl_row where id 1111;--查询多个key select * from public.tbl_row where id in (1111,2222,3333); begin; create table public.tbl_row (id text NOT NULL,name text NOT NULL,class text , PRIMARY KEY (id) ); call set_table_property(public.tbl_row, orientation, row); call set_table_property(public.tbl_row, clustering_key, id); call set_table_property(public.tbl_row, distribution_key, id); commit;--基于PK的点查示例 select * from public.tbl_row where id 1111;设置的PK和Clustering Key不一致(不建议使用)  begin; create table public.tbl_row (id text NOT NULL,name text NOT NULL,class text , PRIMARY KEY (id) ); call set_table_property(public.tbl_row, orientation, row); call set_table_property(public.tbl_row, clustering_key, name); call set_table_property(public.tbl_row, distribution_key, id); commit;行存总结  行存表非常适用于基于PK的点查场景能够实现高QPS的点查。建表时建议只设置PK系统会自动将PK设置为Distribution Key和Clustering Key以提升查询性能。不建议将PK和Clustering Key设置为不同的字段设置为不同的字段会有一定的性能牺牲。 3、行列共存 在实际应用场景中一张表可能用于主键点查又用于OLAP查询因此Hologres在V1.1版本支持了行列共存的存储格式。行列共存同时拥有行列和列存的能力既支持高性能的基于PK点查又支持OLAP分析。数据在底层存储时会存储两份一份按照行存格式存储一份按照列存格式存储因此会带来更多的存储开销。 数据写入时会同时写一份行存格式和写一份列存格式只有两份数据都写完了才会返回成功保证数据的原子性。数据查询时优化器会根据SQL解析出对应的执行计划执行引擎会根据执行计划判断走行存还是列存的查询效率更高要求行列共存的表必须设置主键。 因此行列共存表在通常查询场景尤其是非主键点查场景查询效率更好示例 begin; create table public.tbl_row_col ( id text NOT NULL, name text NOT NULL, class text , PRIMARY KEY (id) ); call set_table_property(public.tbl_row_col, orientation,row,column); call set_table_property(public.tbl_row_col, distribution_key,id); call set_table_property(public.tbl_row_col, clustering_key,class); call set_table_property(public.tbl_row_col, bitmap_columns,name); commit;SELECT * FROM public.tbl_row_col where id 2222; --基于主键的点查 SELECT * FROM public.tbl_row_col where class二班;--非主键点查 SELECT * FROM public.tbl_row_col where id 2222 and class二班; --普通OLAP查示意图如下 四、使用示例  创建不同存储模式的表使用示例如下 --建行存表 begin; create table public.tbl_row (a integer NOT NULL,b text NOT NULL,PRIMARY KEY (a) ); call set_table_property(public.tbl_row, orientation, row); commit;--建列存表 begin; create table tbl_col (a int not null, b text not null); call set_table_property(tbl_col, orientation, column); commit;--建行列共存 begin; create table tbl_col_row (pk text not null, col1 text, col2 text, col3 text, PRIMARY KEY (pk)); call set_table_property(tbl_col_row, orientation, row,column); commit;博客主页https://lansonli.blog.csdn.net欢迎点赞 收藏 ⭐留言 如有错误敬请指正本文由 Lansonli 原创首发于 CSDN博客停下休息的时候不要忘了别人还在奔跑希望大家抓紧时间学习全力奔赴更美好的生活✨
http://www.dnsts.com.cn/news/184978.html

相关文章:

  • 网站建设1001网站建设学校网
  • 中国矿山建设网站网站运营工作计划
  • 网站建设最重要的环节拼多多网店怎么开
  • 有中文网站 怎么做英文网站谷歌上怎样做网站
  • 自己家里做网站网速慢如何把网站做跳转浏览器链接
  • 泉州网站建设策划推广方式的英文
  • 开发公司资质等级以下哪一项不属于seo对网站推广的作用
  • 南沙外贸网站建设代理招生平台
  • 网页设计个人网站心得体会深圳社区网
  • 太原营销型网站建设制作iss服务器网站建设
  • 如何确定一个网站的关键词西安网页制作模板
  • 做彩平的材质网站用dw做网站结构图
  • 江苏省建设厅网站职称评审系统佛山企业网站制作
  • 岳阳建设网站公司上海哪里做网站
  • 电子商务的网站建设要求步骤国家建筑标准设计网
  • 建设银行宁波分行 招聘网站上上海海网网站站建设
  • 项目负责人质量建设厅官方网站网站设计需要考虑哪些基本原则
  • 基于asp.net电子商务网站开发实践中的关键技术和应用平面设计师的前景和收入
  • 帮朋友做网站 知乎贵阳汽车网站建设
  • 成都网站建设著名公司厦门u 网站建设
  • 注册网站排名公司帝国网站后台编辑器没有了
  • 扬州网站建设公司优化网站广告优化
  • 做网站销售那里找客户一起生活小程序怎么注册
  • 基于jsp的电商网站开发邵阳网
  • ps做网站的时候分辨率是wordpress怎么删除文章
  • 做海报图片的网站实名网站空间
  • 山东网站建设平台个人网站建设方案书 备案
  • 建设买卖网站要多少钱做h5网站的公司
  • 网站开发后端语言网站建设从零开始教程
  • 做网站的设计软件wordpress前端上传大文件大小