- 博客(52)
- 收藏
- 关注
转载 mysql号段问题
create table t (a int primary key);insert into t values (0);insert into t values (1);insert into t values (2);inse...
2012-05-04 16:07:36
244
转载 Python模拟抽象类
Python中没有abstract关键字定义抽象类,但是可以通过NotImplementedError类模拟抽象类def abstract (): raise NotImplementedError("Abstract")cl...
2012-04-27 15:10:59
113
转载 二叉排序树
#include #include typedef struct BiTNode{ int data; struct BiTNode *lchild, *rchild;}BiTNode, *BiTree;bool SearchB...
2012-04-08 14:52:51
120
转载 快速排序
#include typedef struct{ int r[11]; int length;}SqList;void swap (SqList * L, int i, int j){ int temp = L->r[i]...
2012-04-06 21:02:42
67
转载 堆排序
#include typedef struct{ int r[11]; int length;}SqList;void swap (SqList * L, int i, int j){ int temp = L->r[i]...
2012-04-05 19:57:53
50
转载 图的深度优先遍历
#include #define MAXVEX 100#define INFINITY 65535typedef int Boolean;Boolean visited[MAXVEX];typedef struct{ char ...
2012-04-01 11:03:35
127
转载 二叉树遍历
#include #include typedef struct BiNode{ char data; struct BiNode *lchild, *rchild;}BiNode, *Btree;/*Ç°Dò±éàú*/voi...
2012-04-01 11:02:59
69
转载 KMP字符串匹配
#include using namespace std;void Get_Next(char* T,int* next); void Get_Nextval(char* T,int* next); int Ind...
2012-04-01 11:02:35
75
转载 冒泡排序
#include typedef struct{ int r[10]; int length;}SqList;void swap (SqList * L, int i, int j){ int temp = L->r[i]...
2012-04-01 11:01:11
50
转载 插入排序
#include typedef struct{ int r[11]; int length;}SqList;void InsertSort (SqList *L){ int i, j; for (i = 2; i < L...
2012-04-01 11:00:30
59
转载 选择排序
#include typedef struct{ int r[10]; int length;}SqList;void swap (SqList * L, int i, int j){ int temp = L->r[i]...
2012-04-01 11:00:01
59
转载 希尔排序
#include typedef struct{ int r[11]; int length;}SqList;void ShellSort (SqList *L){ int i, j; int increment = L->...
2012-04-01 10:58:51
47
转载 策略模式
abstract class Strategy{ public abstract void AlgorithmInterface();}class StrategyA extends Strategy{ publ...
2012-03-26 10:33:33
136
转载 简单工厂模式---四则运算
根据不同的运算符实例化不同的对象class Operation{ protected double numA = 0; protected double numB = 0; public double GetRes...
2012-03-23 14:50:49
148
转载 python中string的操作函数 (转)
在python有各种各样的string操作函数。在历史上string类在python中经历了一段轮回的历史。在最开始的时候,python有一个专门的string的module,要使用string的方法要先import,但后来由于...
2012-02-02 14:07:06
102
转载 python 文件合并
#!/usr/bin/env python# -*- coding: utf-8 -*-'mergeTextFile--用于合并两个文本文件'import os#输入两个文件名while True: file1 = raw...
2012-01-27 10:31:16
73
转载 python随机数
这些方法位于random模块中random.random(),同javascript的Math.random(),返回[0.0,1)之间的浮点数random.uniform(a, b),返回[a,b]之间的浮点数...
2012-01-20 11:34:55
119
转载 Hash join (转)
hash join是oracle里面一个非常强悍的功能,当做hash join时,oracle会选择一个表作为驱动表,先根据过滤条件排除不必要的数据,然后将结果集做成hash表,放入进程的hash area,接...
2011-12-28 20:25:23
67
转载 java数组传入oracle
数据库的环境 1* create table t (b varchar2(90))SQL> /表已创建。SQL> create or replace procedure insert_t(a varray_list...
2011-12-17 10:55:27
129
转载 检查点详解(转)
checkpoint扫盲什么是checkpoint在数据库系统中,写日志和写数据文件是数据库中IO消耗最大的两种操作,在这两种操作中写数据文件属于分散写,写日志文件是顺序写,因此为了保证数据库的性能,通常数据库...
2011-12-14 17:05:51
277
转载 层次查询
在scott用户下查询emp表SQL> select empno, ename, mgr from emp; EMPNO ENAME MGR---------- ----...
2011-12-14 14:16:07
57
转载 集合的交集、并集和差集
MULTISET EXCEPT takes as arguments two nested tables and returns a nested table whose elementsare in the first ne...
2011-12-12 19:48:11
399
转载 db_file_multiblock_read_count
在多块读的情况下,db_file_multiblock_read_count的值指定了一次最多可读取的数据块数目。实际情况下一次IO很难达到该参数的值。《性能诊断艺术》里面写着有三中情况会导致一次多块读的数目小于次参数1、读...
2011-12-08 17:09:38
122
转载 Hint Cardinality
ty@BBK10G> create table t1 as select rownum id, object_name from dba_objects where rownum < 1001;Table creat...
2011-12-06 20:50:29
115
转载 CBO与RBO的基本概念
RBO的执行机制非常简单,就是在优化器内置制订了一些规则,执行SQL时按照这些规则执行就可以了。比如,如果谓词上有索引就会选择走索引。ty@BBK10G> drop table t;Table dropped.ty@BBK...
2011-12-06 15:32:14
212
转载 显示游标与隐式游标对加锁的区别
有表tSQL> desc t名称 是否为空? 类型----------------------------------------- -----...
2011-12-05 17:06:30
81
转载 绑定变量的缺点
SQL> create table t (id number, pad varchar2(100));表已创建。SQL> insert into t2 SELECT ro...
2011-11-29 15:13:10
364
转载 基本的行列转换
SQL> create table work_rec2 (id number, name varchar2(9), type varchar2(9), done number);表已创建。SQL> insert...
2011-11-25 21:09:57
152
转载 merge的基本用法
SQL> create table test2(a number, b number);表已创建。SQL> create table test3(a number, b number);表已创建。SQL> in...
2011-11-25 21:06:23
111
转载 DBMS_PROFILER的基本用法
DBMS_PROFILER包专门分析plsql,可以分析到每行,非常有用的工具。这个包默认不安装需要手动安装,脚本为?\rdbms\admin下的profload.sql和proftab.sql,第二个为工具表的sql。安装完成...
2011-11-23 16:16:04
170
转载 索引扫描
SQL> select count(*) from t4;COUNT(*)---------- 10000 id为主键,n上有索引SQL> EXPLAIN PLAN FOR2 SELECT /*+...
2011-11-21 15:31:01
57
转载 对max和min的实验
有一张表TSQL> desc t名称 是否为空? 类型----------------------------------------- ---...
2011-11-19 11:37:04
93
转载 number占用的空间
SQL> create table t (a number, y number);表已创建。SQL> insert into t (a) select to_number(rpad('9', rownum*2, '...
2011-11-16 21:09:40
160
转载 session_cached_cursors
SQL> show parameter session_caNAME TYPE------------------------------------ ---...
2011-11-16 13:00:01
103
转载 聚簇因子
聚簇因子的值表示了表中行的有序程度,这个值与块数接近时,说明表有序程度很好,得到了很好的组织。在这种情况下,同一个叶子块中的索引条目可能指向同一个数据块上的行。聚簇因子与行值相近时,表的次序是非常随机的,同一个叶子块上的索引条目...
2011-11-09 21:17:50
67
转载 转 父游标 子游标
1.v$sql和v$sqlarea的区别v$sql和v$sqlarea从某种意义上具有父子关系。即v$sqlarea保存的是父游标的sql信息,而v$sql保存的是子游标的sql的信息。在v$sqlarea里面有一列VERSIO...
2011-11-04 21:16:03
48
转载 Innodb锁的一点实验
创建一个innodb引擎的表mysql> create table test (a int, b char(10)) engine=innodb;Query OK, 0 rows affected (0.13 sec)my...
2011-10-26 20:27:07
43
转载 pl/sql批量绑定
SQL> desc test名称 是否为空? 类型----------------------------------------- -----...
2011-10-26 19:48:35
83
转载 跟踪SQL
今天看视频学习了怎样在查看客户端执行的sql,把它记录下来C:\Users\tyty>sqlplus u1/u1@10.201.1.134/tyodzSQL*Plus: Release 10.2.0.3.0 - P...
2011-09-26 16:24:03
77
转载 raid 5基本创建过程
我的机器硬盘分区情况[root@centos ~]# fdisk -lDisk /dev/sda: 79.9 GB, 79949722112 bytes255 heads, 63 sectors/track, 9720 cyli...
2011-09-02 22:18:52
191
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人