作者:胖头鱼的鱼缸(尹海文)
Oracle ACE Pro: Database(Oracle与MySQL)
PostgreSQL ACE Partner
10年数据库行业经验,现主要从事数据库服务工作
拥有OCM 11g/12c/19c、MySQL 8.0 OCP、Exadata、CDP等认证
墨天轮MVP、认证技术专家、年度墨力之星,ITPUB认证专家、专家百人团成员,OCM讲师,PolarDB开源社区技术顾问,HaloDB外聘技术顾问,OceanBase观察团成员,青学会MOP技术社区(青年数据库学习互助会)技术顾问
圈内拥有“总监”、“保安”、“国产数据库最大敌人”等称号,非著 名社恐(社交恐怖分子)
公众号:胖头鱼的鱼缸;CSDN:胖头鱼的鱼缸(尹海文);墨天轮:胖头鱼的鱼缸;ITPUB:yhw1809。
除授权转载并标明出处外,均为“非法”抄袭
空了两期,今天继续HaloDB-Oracle兼容性测试,这次把之前测试表都清理了。
CREATE TABLE halo_test ( a SERIAL, b NUMERIC);CREATE INDEX a_btree ON halo_test (a);drop table halo_test;

CREATE TABLE halo_test ( a SERIAL, b NUMERIC);CREATE INDEX a_hash ON halo_test USING HASH (a);drop table halo_test;

CREATE TABLE halo_test ( a SERIAL, b NUMERIC);CREATE INDEX a_cobime ON halo_test (a, b);select * from pg_indexes where tablename='halo_test'; drop table halo_test;

CREATE TABLE halo_test ( a SERIAL, b NUMERIC);CREATE UNIQUE INDEX a_unique ON halo_test (a);select * from pg_indexes where tablename='halo_test'; drop table halo_test;

CREATE TABLE halo_test ( a SERIAL, b NUMERIC);CREATE INDEX b_expr ON halo_test (trunc(b));drop table halo_test;

CREATE TABLE halo_test ( a SERIAL, b NUMERIC);CREATE INDEX b_partial ON halo_test (b) WHERE b >= 10 AND b <= 100;drop table halo_test;

CREATE TABLE halo_test ( a SERIAL, b NUMERIC);insert into halo_test(b) values(1);insert into halo_test(b) values(200);CREATE VIEW v_halo_test ASSELECT b FROM halo_test WHERE b <= 100;select * from v_halo_test;drop view v_halo_test;drop table halo_test;

创建测试表:
CREATE TABLE halo_test1 ( a SERIAL, b NUMERIC);CREATE TABLE halo_test2 ( c SERIAL, d NUMERIC);insert into halo_test1 values(1,2);insert into halo_test1 values(2,2);insert into halo_test2 values(1,3);insert into halo_test2 values(3,3);
SELECT * FROM halo_test1, halo_test2 WHERE a = c;SELECT * FROM halo_test1 INNER JOIN halo_test2 ON a = c;

SELECT * FROM halo_test1 LEFT JOIN halo_test2 ON a = c;SELECT * FROM halo_test1 RIGHT JOIN halo_test2 ON a = c;

SELECT * FROM halo_test1 FULL JOIN halo_test2 ON a = c;

drop table halo_test1;drop table halo_test2;
CREATE TABLE halo_test ( a SERIAL, b NUMERIC);insert into halo_test(b) values(11);insert into halo_test(b) values(12);SELECT max(b) FROM halo_test;

SELECT avg(b) OVER(PARTITION BY b) FROM halo_test;drop table halo_test;

本期针对HaloDB的索引、视图、表连接、聚合函数和窗口函数的Oracle数据库兼容性进行了测试,测试结果非常优秀。
老规矩,知道写了些啥。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31466763/viewspace-3020144/ ,如需转载,请注明出处,否则将追究法律责任。