易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

航空公司管理系统(VC++ 与SQL 2005)

系统环境:Windows 7
软件环境:Visual C++ 2008 SP1 +SQL Server 2005
本次目的:编写一个航空管理系统
      这是数据库课程设计的成果,虽然成绩不佳,但是作为我用VC++ 以来编写的最大程序还是传到网上,以供参考。用VC++ 做数据库设计并不容易,但也不是不可能。以下是我的程序界面,后面 ......

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 ......

类似SQL 的Group by功能

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

C#打包SQL数据库部署安装

参考《ASP.NET与SQL一起打包部署安装》,这篇文章是针对VB.NET与SQL 一起打包的,但是我使用的是C#,当然只要修改一下主要安装类库就行了!C#的类库代码如下:DBCustomAction.cs
using System;
using System.Collections;
using System.Data.SqlClient;
using System.ComponentModel;
using System.Configuration.Install; ......

SQL时间类型模糊查询

     数据库类型为DateTime类型,将其做模糊查询时,在Hibernate中,可以用拼SQL的问题将其解决,即在SQL查询分析器写SQL一样,但是利用参数配置,则方法如下:
     1、拼上SQL,如:
            String beginPara= &q ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号