- 博客(8)
- 收藏
- 关注
转载 mysql优化
数据库优化 选择合适的cpu 数据库应用分类,一般分为两类:OLTP(online transaction processing 在线事务处理)和OLAP(online analytical processing 在线分析处理),这是两种完全不同的地数据库应用。OLAP多用在数据仓库或数据集市
2011-12-24 12:55:04
525
原创 Linux网络相关配置文件
Linux网络相关配置文件/etc/sysconfig/network 这个文件的主要功能用于设定默认的GATEWAY,修改主机名称(HOSTNAME),是否启动Network。/etc/sysconfig/network-scripts/ifcfg-ethN 这个文件的内容即是设定网卡的参数文件,里面可以设定network,IP,netmask(子网掩码),b
2011-12-19 14:46:31
418
原创 SQLSERVER聚集索引与非聚集索引(转)
SQLSERVER聚集索引与非聚集索引(转)2009/10/27 18:12 [sql server ] <br /><br />微软的SQL SERVER提供了两种索引:聚集索引(clustered index,也称聚类索引、簇集索引)和非聚集索引(nonclustered index,也称非聚类索引、非簇集索引)……<br />(一)深入浅出理解索引结构<br /><br />实际上,您可以把索引理解为一种特殊的目录。微软的SQL SERVER提供了两种索引:聚集索引(clustered index
2010-09-12 17:13:00
395
原创 生成序列值
if object_id('t1') is not nulldrop table t1gocreate table t1(col1 varchar(100),col2 varchar(20),col3 varchar(30))insert into t1select 'a','100','' union allselect 'f','100','' union allselect 'g','100','' union allselect 'b','100','' union allselect 'c','2
2010-09-08 21:30:00
426
原创 使用CTE删除表中重复的数据
<br />if object_id('test1') is not null<br />drop table test1; <br />go<br />create table test1(keycol int,customerID varchar(10),n varchar(5))<br />insert into test1<br />select '1','10001','5' union all<br />select '2','10001','4' union all<br />select
2010-09-04 20:34:00
551
原创 寻找断点
<br />/*<br />寻找断点<br />*/<br />if object_id('test1') is not null<br />drop table test1<br />go<br />create table test1(t1 int, t2 varchar(10));<br />insert into test1<br />select 2,'b' union all<br />select 3,'c' union all<br />select 4,'d' union all<br /
2010-09-04 12:49:00
482
原创 三种找每个客户最小订单的写法
/*三种找每个客户最小订单的写法*/select djbh,dm1,rq from pfxhd as o1where not djbh > any (select djbh from pfxhd o2 where o1.dm1=o2.dm1) select djbh,dm1,rq from pfxhd as o1where djbh select djbh,dm1,rq from pfxhd as o1where djbh = (select min(djbh) from pfxhd o2 where
2010-09-04 12:13:00
930
原创 快速向表中插入100W行数据
/*方法1用时21秒快速向表中插入100w行数据*/if object_id(nums) is not nulldrop table numsgocreate table nums (n int primary key);declare @max int ,@rc intselect @max=1000000;select @rc=1;insert into nums (n) valu
2010-04-19 17:08:00
1007
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人