Oracle查询表空间使用情况(经典篇)
--查询表空间使用情况 SELECT UPPER(F.TABLESPACE_NAME) "表空间名", D.TOT_GROOTTE_MB "表空间大小(M)", D.TOT_GROOTTE_MB - F.TOTAL_BYTES "已使用空间(M)", TO_CHAR(ROUND((D.TOT_GROOTTE_MB - F.T...
关于 shared cursor,parent cursor,child cursor
1. shared ,parent cursor,child cursor 概念: 所有SQL都是Oracle暗式共享的(implicitly sharable)。当用户A发出一条SQL后,Oracle会根据SQL文本内容生成hash value...
关于HW-contention等待的处理
在大量并发插入时,发生busy buffer wait 和HW-contentionwait首先增大freelist,但HW问题没有解决方法如下:The HW enqueue is used to serialize the allocation of space beyond the high water mark of a segmen...
数据库选型的一些看法2(转)
关于数据库平台的选型,一般需要先对应用系统进行大致的分类,个人认为,就目前的大部分应用系统而言,可以分为以下的三类:1,企业中用于日常生产的ERP系统。2,企业中的数据仓库的各项应用。3,互联网的一些应用系...
数据库选型的一些看法(转)
在做项目的技术选型时,对于数据库我们一般是这么选择的:一、客户指定了数据库的情况。比如某些**用户指定要用Oracle,我们当然是以客户的要求为最高优先级了。二、项目总预算不高的情况,对于企业级应用,如各种管...
perl中my与local的区别
my: lexically scoped variablelocal:Dynamically scoped variable 内部->外部:(1)my和local都只在一个block里有效,出去就失效;(2)但是local的变量可以继续在这个block中调用的子程序中存在;(3)如果...
Perl中有效创建Getter 和Setter的方法
利用Class::MethodMaker可以有效避免重新写很多getter和setter的代码,具体如下:package Animal;use Class::MethodMakernew_with_init => 'new',get_set => [ -eiffel => [qw(color height name age)]],...
Coverage Testing
Coverage Test 包括:Statement coverage、Branch coverage、Path coverage、expression coverage and so on. 资料Devel::Coverage::Tutorial$perl -MDevel::Cover yourprog args$cover$cover -delete ...
Restricting a Method to Class-Only o Instance-Only
use Carp qw(croak);sub instance_only {ref(my $self = shift ) or croak "instance variable needed";... use $self as the instance ...}sub class_only {ref(my $self = shift) and croak "class nam...
MySQL数据库性能优化之表结构优化(转)
很多人都将<数据库设计范式>作为数据库表结构设计“圣经”,认为只要按照这个范式需求设计,就能让设计出来的表结构足够优化,既能保证性能优异同时还能满足扩展性要求。殊不知,在N年前被奉为“圣经”的数据库...
MySQL数据库性能优化之缓存参数优化(转)
在平时被问及最多的问题就是关于 MySQL 数据库性能优化方面的问题,所以最近打算写一个MySQL数据库性能优化方面的系列文章,希望对初中级 MySQL DBA 以及其他对 MySQL 性能优化感兴趣的朋友们有所帮助。 ...
Perl的面向对象方法
{package LivingCreature;sub speak{my $class = shift;my $gender = shift;print "a $gender $class goes ", $class->sound, "!\n";}}{ package Animal;@ISA = qw(LivingCreature);# no definition...
Hadoop 0.23.x从原理详解到安装体验(3)(转)
部署步骤: (1) 配置SSH无密码登录,注意所有的NameNode都要能够无密码登录到所有的DataNode中。 (2)配置环境变量,hadoop的那些执行脚本会用到。 在~/.bashrc文件内添加(注意,此处我们目前只配置了HDFS...
Filehandle References
1)IO::Fileuse IO::File;my $fh = IO::File->new( ' > castaways.log' )or die "Could not create filehandle: $!";my $read_fh = IO::File->new( 'castaways.log', 'r' );my $write_fh = IO::File->new( ...
DBA 应该具备什么样的特质?(转)
我们究竟要成为一个怎么样的DBA,公司究竟需要一个怎么样的DBA?作为一个DBA应该须有怎么样的素质?首先作为一个DBA,数据库的基本功很重要,了解数据库的内存结构,物理结构,了解数据库由物理文件到内存是怎么运作...
Clouse Variables as Inputs
use File::Find;sub print_bigger_than {my $minmum_size = shift;return sub { print "$File::Find::name\n" if -f and -s >= $minimun_size};}my $bigger_than_1024 = print_bigger_than(1024);find ($b...
oracle行链接的检测和处理(转)
1、测试行链接SQL> create table tt(a char(2000),b char(2000),c char(2000),d char(2000),e char(2000)) ;SQL> insert into tt values('a','b','c','d','e');SQL> commit;--分析SQL> @?\RDBMS\ADMIN\utl...
Perl的一些重要模块使用介绍
1) use Cwd;my $directory = cwd;2) use Fatal qw/ open chdir/;chdir '/home/merlyn'; # "or die" is now supplied automatically3) use File::Basename;for (@ARGV){my $basename = basename $_;m...
使用sprintf 输出"money number"
sub big_money{1my $number = sprintf "%.2f", shift @_;2#add one comma each time through the do-nothing loop31 while $number =~ s/^(-?\d+)(\d\d\d)/$1,$2/;4# Put the dollar sign in the right ...
Non-Greedy and Greedy Quantifier In Perl
比较以下两个正则匹配:$_ = "fred and barney went bowling last night ";1)贪心/fred.+barney/过程:首先匹配成功fred,然后.+匹配之后尽量多的信息,即:and barney went bowling last night,随后barne...