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
Ïà¹ØÎĵµ£º
create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ
......
ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃæ£¬ºóÃæ ......
Ò».Êý¾Ý¿ØÖÆÓï¾ä (DML) ²¿·Ö
1.Insert (ÍùÊý¾Ý±íÀï²åÈë¼Ç¼µÄÓï¾ä)
Insert INTO ±íÃû(×Ö¶ÎÃû1, ×Ö¶ÎÃû2, ……) VALUES ( Öµ1, Öµ2, ……);
&nb ......
²Î¿¼¡¶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; ......
1. ¼òµ¥ÐðÊöSQL Server 2000µÄ°²È«ÈÏÖ¤¹ý³Ì¡£
´ð£ºSQL Server 2000ÖУ¬ÏµÍ³Óüì²é¿ÚÁî¡¢ÉèÖýÇÉ«¡¢Ðí¿ÉµÈÊÖ¶ÎÀ´¼ì²éÓû§µÄÉí·Ý¼°Ê¹ÓÃȨÏÞ¡£ºÏ·¨µÄÓû§²ÅÄܽøÈëÊý¾Ý¿âϵͳ£¬µ±Óû§¶ÔÊý¾Ý¿âÖ´ÐвÙ×÷ʱ£¬ÏµÍ³×Ô¶¯¼ì²éÓû§ÊÇ·ñÓÐȨÏÞÖ´ÐÐÕâЩ²Ù×÷¡£Ò»¸öÓû§Èç¹ûÒª·ÃÎÊSQL ServerÊý¾Ý¿âÖеÄÊý¾Ý£¬Ëû±ØÐëÒª¾¹ýÈý¸öÈÏÖ¤¹ý³Ì¡£
£ ......