摘要: 分别创建表: create table my_mutable (id varchar not null primary key, cf1.a varchar , cf1.b varchar, cf2.c varchar, cf2.d varchar) ; create table my_immuta 阅读全文
posted @ 2014-11-09 15:33 lihui1625 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 统计收集有助于提升query性能。 命令: UPDATE STATISTICS my_table 等效于 UPDATE STATISTICS my_table ALL 如果只收集index或者column 等效于 UPDATE STATISTICS my_table ALL 如果只收集index或者 阅读全文
posted @ 2014-11-09 14:23 lihui1625 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 只支持Hadoop2 配置 hadoop-metrics2-phoenix.properties 配置 hadoop-metrics2-hbase.properties 配置 hbase-site.xml <configuration> <property> <name>phoenix.trace. 阅读全文
posted @ 2014-11-09 13:59 lihui1625 阅读(257) 评论(0) 推荐(0) 编辑
摘要: The List<List<KeyRange>> for SkipScanFilter for the above query would be [ [ [ a - b ], [ d - e ] ], [ 1, 2 ] ] where [ [ a - b ], [ d - e ] ] is the 阅读全文
posted @ 2014-11-09 13:45 lihui1625 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 组合使用order by, > , LIMIT : 阅读全文
posted @ 2014-11-09 13:37 lihui1625 阅读(100) 评论(0) 推荐(0) 编辑
摘要: creating a table: CREATE TABLE regions ( region_name VARCHAR PRIMARY KEY, zips VARCHAR ARRAY[10], CONSTRAINT pk PRIMARY KEY (region_name)); Insert sel 阅读全文
posted @ 2014-11-09 13:32 lihui1625 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 创建多租户表: 连接到某租户的数据库表: Properties props = new Properties(); props.setProperty("TenantId", "Acme"); Connection conn = DriverManager.getConnection("localh 阅读全文
posted @ 2014-11-09 12:21 lihui1625 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 1、IN 和 Not In 的子查询 SELECT ItemName FROM Items WHERE ItemID IN (SELECT ItemID FROM Orders WHERE Date >= to_date('2013/09/02')); 2、Exists 和Not Exists的子查 阅读全文
posted @ 2014-11-09 11:44 lihui1625 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 1、immutable Index 原文:Immutable indexing targets use cases that are write once, append only; this is common in time-series data, where you log once, bu 阅读全文
posted @ 2014-11-09 11:37 lihui1625 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 在Property里面设置属性 "CurrentSCN"。 ts是一个long。 Properties props = new Properties(); props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts)); 阅读全文
posted @ 2014-11-09 11:26 lihui1625 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 1、加盐: 加盐可以将数据存入多个region里,从而提升读写性能。 CREATE TABLE TEST (HOST VARCHAR NOT NULL PRIMARY KEY, DESCRIPTION VARCHAR) SALT_BUCKETS=42 如果有16台region server,每台se 阅读全文
posted @ 2014-11-09 11:08 lihui1625 阅读(191) 评论(0) 推荐(0) 编辑