易截截图软件、单文件、免安装、纯绿色、仅160KB

SQL Server 2008新特性-数据压缩

数据压缩(Data Compression)是SQL Server 2008引入的新特性之一,这项技术使数据更有效的保存并且极大减少了存储开销,同时也带来了性能上的显著提高,尤其是对需要大量磁盘I/O的数据仓库。
 
注:其实在SQL Server 2005 SP2版本中,已经引入了 vardecimal ,它使用变长的格式存储定长的decimal和numberic数据。
 
SQL Server 2008支持两种数据压缩:行压缩(Row Compression)和页面压缩(Page Compression)。
数据压缩仅在企业版和开发版中可用。
 
行压缩将定长的字段以变长的物理空间来存储,从而节省了存储空间。
例如,定长的字段char(100)中存储“SQL Server 2008”只需要15字符的长度,而非100字符,从而节约了85%的空间,另外,对于0和null,将不占用存储空间。
行压缩下各类型数据的空间占用:
数据类型
是否影响
细节
tinyint
No
1 byte is the minimum storage needed.
smallint
Yes
If the value fits in 1 byte, only 1 byte will be used.
int
Yes
Uses only the bytes that are needed. For example, if a value can be stored in 1 byte, storage will take only 1 byte.
bigint
Yes
Uses only the bytes that are needed. For example, if a value can be stored in 1 byte, storage will take only 1 byte.
decimal
Yes
This storage is exactly same as the vardecimal storage format. For more information, see Storing Decimal Data As Variable Length.
numeric
Yes
This storage is exactly same as the vardecimal storage format. For more information, see Storing Decimal Data As Variable Length.
bit
Yes
The metadata overhead brings this to 4 bits.
smallmoney
Yes
Uses the integer data representation by using a 4-byte integer. Currency value is multiplied by 10000 and the resulting integer value is stored by removing any digits after the decimal point. This type has a storage optimization similar to that for integer types.
money
Yes
Uses the integer data representation by using an 8-byte integer. Currency value is multiplied by 10000 and the resulting integer value is stored by removing any digits after the decimal point. This type has a larger range than smallmoney. This type


相关文档:

sql 2005 存储过程分页 java 代码

 create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',         
@pagesize int output,--每页显示记录条数
@currentpage int output,--第几页
@orderid nvarchar(50),--主键排序
@sort int,--排序方式,1表示升序,0表示降序排列 ......

Sql Server 获取、增加、修改、删除 字段描述

获取、增加、修改、删除sqlserver字段描述
Select o.name AS tableName, c.name AS columnName, p.[value] AS Description  
from sysproperties p INNER JOIN  
      sysobjects o ON o.id = p.id INNER JOIN  
      syscolumn ......

ORACLE 常用的SQL语法和数据对象

 一.数据控制语句 (DML) 部分
            1.Insert (往数据表里插入记录的语句)
            Insert INTO 表名(字段名1, 字段名2, ……) VALUES ( 值1, 值2, ……);
&nb ......

类似SQL 的Group by功能

最近做了几个小小统计的报表界面,由于.net不带group by 的功能,统计起来有时候相当不便,便趁着睡着的时候写了一个类似的方法。
有不足之处或是有更好的方法还望大家指正。
至于效率如何?未知,因为本人的测试数据就是比较少。
/// <summary>
/// SQL Group by
/// </summary>
/// &l ......

c#sql server


using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using AHUT_TetWebERP;
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号