Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

sqlserverÊý¾Ý¿âµÄ´óС - MS-SQL Server / »ù´¡Àà

ͬÑùµÄÊý¾Ýsqlserver¾­¹ýÊÕËõ£¬Çå¿ÕÈÕÖ¾ ×îºó´óСÊÇ196M
ÆäÖÐÖ»ÓÐÒ»¸ö±íµÄÊý¾Ý¶àһЩ ´óÔ¼42ÍòÌõÊý¾Ý£¬µ¼³ö³ÉÎı¾ºóÊÐ62M
µ«ÎÒ°ÑÕû¸öÊý¾Ý¿âµ¼³öµ½ASAÊý¾Ý¿âºóÊý¾ÝÎļþÊÇ48M£¬ÈÕÖ¾ÎļþÊÇ40M£¬
Ϊʲô»á²î±ðÕâô´ó£¿
sqlserverµÄÊý¾Ý¿â»¹ÓÐûÓа취ÔÙËõС£¿
²»Í¬Êý¾Ý¿âÖ®¼ä¸ñʽ£¬´æ´¢·½Ê½£¬¿Õ¼ä·ÖÅ䶼²»Ò»Ñù£¬Ã»Ê²Ã´¿É±ÈÐԵġ£

use dbname
go
EXEC sp_spaceused

unallocated space¾ÍÊÇÒѾ­ÄãÊý¾Ý¿âÀïµÄ¿ÉÓÿռ䣨ͨ³£Õⲿ·Ý¾ÍÊÇ¿ÉÒÔÊÕËõµôµÄ£©.

unallocated space ÊÇ-128.42M ÊǸºÊý£¬£¬£¬Õâ¸öÊý¾Ý¿âÊÇÒѾ­ÊÕËõÍêµÄ£¬»¹ÓÐûÓÐÆäËû°ì·¨£¿

use dbname
go
EXEC sp_spaceused null,true
GO

ÔÙ¿´¿´

database size 196M
unallocated 0.11M

ÒýÓÃ
ͬÑùµÄÊý¾Ýsqlserver¾­¹ýÊÕËõ£¬Çå¿ÕÈÕÖ¾ ×îºó´óСÊÇ196M
ÆäÖÐÖ»ÓÐÒ»¸ö±íµÄÊý¾Ý¶àһЩ ´óÔ¼42ÍòÌõÊý¾Ý£¬µ¼³ö³ÉÎı¾ºóÊÐ62M
µ«ÎÒ°ÑÕû¸öÊý¾Ý¿âµ¼³öµ½ASAÊý¾Ý¿âºóÊý¾ÝÎļþÊÇ48M£¬ÈÕÖ¾ÎļþÊÇ40M£¬
Ϊʲô»á²î±ðÕâô´ó£¿
sqlserverµÄÊý¾Ý¿â»¹ÓÐûÓа취ÔÙËõС£¿

²îµã¾Í¾Í²îµã£¬ÊDz»ÊÇÄãµÃASAÀïû½¨Ë÷Òý£¬sqlserverÀィÁËË÷Òý

Ä¿Ç°À´¿´Ã»µÄÊÕËõÁË¡£

ÄãµÄÄÇЩ±í¶¼Óоۼ¯Ë÷ÒýÂ𣿠ÓеĻ°¶¼Öؽ¨£¬Ã»Óоͽ¨Á¢¾Û¼¯Ë÷Òý£¬È»ºóÔÙÊÕËõ£¬ÕâÑùÓ¦¸ÃÄÜÔÚÌÚ³öЩ¿Õ¼äÀ´¡£




Èç¹û±íÉÏÓоۼ¯Ë÷Òý¡£¡£¡£É¾³ýÊý¾Ýºó¿Õ¼äÊDz»»áÊͷųöÀ´µÄ¡£¡£¡£Öؽ¨Ë÷Òýºó²Å»áÊÍ·Å¿Õ¼ä°É¡£

ºÃÏñÊÇÕâÑù¡£¡£¡£


ûÓÐÔٺõİ취ÁËÂð£¿

ÒýÓÃ
ûÓÐÔٺõİ취ÁËÂð£¿

ÎÒ¿´Ã


Ïà¹ØÎÊ´ð£º

sqlÓï¾ä¶à±í¶à×ֶβéѯ - MS-SQL Server / »ù´¡Àà

ÎÒÓжà¸ö±íA B C ½á¹¹ÊÇÒ»ÑùµÄ£¬¶¼ÓÐ2¸ö×Ö¶ÎnameºÍcontent,ÎÒÒªËÑË÷ËùÒÔ±íËùÓÐ×Ö¶ÎÖаüº¬¡°Öйú¡±µÄÄÚÈÝ Õâ¸öSQLÓï¾äÔõôд 

ÈçºÎ½«¶à¸ö±íµÄ²éѯ½á¹ûÁ¬³ÉÒ»¸ö±í Õâ¸öSQLÓï¾äÔõôд ±íµÄ½á¹¹ÊÇÒ»ÑùµÄ
ÀýÈç£ ......

SQLÈçºÎÓÅ»¯ÎÊÌâ - MS-SQL Server / ÒÉÄÑÎÊÌâ

½ñÌì×öÁËÒ»¸ö´æ´¢¹ý³Ì   »·¾³ÊÇSQL2000Êý¾Ý¿â  
´óÖÂÈçÏÂ
½¨Á¢ÁÙʱ±í
¶¨ÒåÔ±¹¤Óαê
        Ñ­»·Ô±¹¤£¨ÊôÓÚ1¸ö¹«Ë¾)  
        ......

mysqlÇøû¸ßÊÖ - MS-SQL Server / »ù´¡Àà

ÎÒ¾õµÃmysqlºÍsqlserverÓй²Í¬µÄµØ·½£º
ÓиöÎÊÌâÊǹØÓÚ±íµÄËøÎÊÌ⣺
½ø³ÌA ½ø³ÌB
select * from user where id in lock share mode£¨¹²ÏíËø)
&nb ......

SQL²»Ã÷°× - MS-SQL Server / Ó¦ÓÃʵÀý

²éѯѧÉúƽ¾ù³É¼¨¼°ÆäÃû´Î 
  SELECT 1+(SELECT COUNT( distinct ƽ¾ù³É¼¨) 
  from (SELECT S#,AVG(score) AS ƽ¾ù³É¼¨ 
  from SC&n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ