- 博客(14)
- 资源 (25)
- 收藏
- 关注
转载 perl的逻辑运算
perl语言与其它语言一样,也有逻辑运算,但是由于perl没有基本变量类型的原因,逻辑运算过程往往会产生一定的隐患。if($value){} 这种写法,经常用来判断$value是否已定义,尤其$value作为数组中的值时。在通常的分类中,perl中的变量分为标量、矢量和布尔。其中,标量分为列队、数组和散列。标量分为数字、字符串、指针和未定义。这些分类最大的特点就是可以根据当前
2012-05-24 13:58:00 3931
原创 Get the distributed keys of Greenplum by SQL query
select p.attnum,p.attname::varchar,a.tablename frompg_attribute p , (select a1.localoid,a1.attrnums,a2.tablename from gp_distribution_policy a1,(select a.relfilenode,n.nspname||'.'||a.relname as
2012-05-24 10:42:08 988
原创 Print Log with timestamp
/* * Print Log with timestamp. */ public void PrintLog(PrintWriter logBuffer, String line){ if(logBuffer == null){ return; } java.util.Date datetime = new java.util.Date(); SimpleDateF
2012-05-24 10:39:25 712
转载 GREENPLUM介绍之数据库管理(三)
与其它关系型数据库一样,二维表同样是GP中最重要的存储数据对象。只不过为了更好的支持数据仓库海量数据的访问,GP在表这个层面为我们提供了更多更好的选项。从数据存储方式上看,GP的表可以分成面向行存储的普通堆积表和面向列存储的AOT表(APPEND ONLY TABLE)(当然AOT表也可以是按行存储的,但是按列存储必须是AOT表)。这样,我们在设计应用上可以获得相当的灵活性。比如经常需要更
2012-05-16 15:19:36 4675
转载 GREENPLUM介绍之数据库管理(二)
下面介绍一个把ORACLE数据库中的DEMO,SALES HISTORY移植到GREENPLUM的过程。这样大家可以在GP中有些DEMO数据,深入学习GP的各项功能。首先,创建目录mkdir -p /stage/sales_data我们需要把ORACLE SH SCHEMA下的数据导成平面文件,比较快捷高效的方式是通过sqlplus完成这个工作,把用来查询的SQL写入一个文件,比如
2012-05-16 15:13:43 2412
转载 GREENPLUM介绍之数据库管理(一)
为了方面使用GP的工具,我们首先应该为操作系统用户gpadmin设置环境变量,vi .bash_profilesource /usr/local/greenplum-db/greenplum_path.shexport MASTER_DATA_DIRECTORY=/data/vol1/master --指向master的数据目录。如何启动数据库服务在master节点上,请
2012-05-16 15:09:38 1355
转载 Append-only tables in Greenplum
append-only tablesAn append-only (AO) table is a storage representation that allows only appending new rows to a table, but does not allow updating or deleting existing rows. This allows for more co
2012-05-16 14:14:04 3240
原创 GreenPlum获取table、schema及其database大小
select pg_size_pretty(pg_relation_size('schema_name.table_name'));
2012-05-16 13:45:03 13279 1
原创 GreenPlum--Case When
When it is essential to force evaluation order, a CASE construct may be used. For example, this is an untrustworthy way of trying to avoid division by zero in a WHERE clause:SELECT ... WHERE x 1.
2012-05-15 11:22:58 3464
原创 java正则表达式取各分组
java正则表达式取各分组 import java.util.regex.*;String line = "schema.table";Matcher m = Pattern.compile("(\\w+)\\.(\\w+)").matcher(line);while(m.find()){ String schemaName = m.group(1); String ta
2012-05-10 21:06:58 779
原创 Perl中的向后引用
\n表示向后引用use strict;use warnings;my $str = " hello world ";if($str =~ /(?#start of a tag)]+)>(.*?)(?#end od a tag)/){ print "$1\n"; print "$2\n"; print "$3\n";}
2012-05-10 20:51:54 603
原创 DatabaseMetaData.getIndexInfo
getIndexInfopublic ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique,
2012-05-08 18:51:19 3689
转载 ORDER BY ordinal position
For this query:select first_name, hire_date, salary, manager_id mid from employees where department_id in(110,100)order by 4,2,3My question is: what does the last line "order by 4,2,3" mean?
2012-05-08 17:34:04 2513
转载 VS Debug与Release
在使用VC开发软件的过程中,正当要享受那种兴奋的时候突然发现:release与debug运行结果不一致,甚至出错,而release又不方便调试,真的是当头一棒啊,可是疼归疼,问题总要解决,下面将讲述一下我的几点经验,看看是不是其中之一:1. 变量。大家都知道,debug跟release在初始化变量时所做的操作是不同的,debug是将每个字节位都赋成0xcc(注1),而release的赋
2012-05-06 09:36:42 2843 2
The C++ Programming Language.Third Edition.1997
2011-11-13
The C++ Programming Language Special 3rd Edition
2011-06-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人