Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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Óï¾ä¡£ - Oracle / ¿ª·¢

ÎÒÓÐÒ»¸ö±í£¬½á¹¹ÊÇÕâÑù¡£
  ת³ö µ¥Î» תÈ뵥λ ±ÊÊý ½ð¶î
date(Ö÷) outid(Ö÷) inid(Ö÷) num amt
2009 1 2 1 500 Ϊ 1 µ¥Î» ÔÚ2009Ä ......

MS SQL×÷ÒµÎÊÌâ - MS-SQL Server / Ó¦ÓÃʵÀý

ÈçºÎÔÚSQL2005ÖÐÉ趨¶¨Ê±×÷Òµ£¬±ÈÈç˵¶¨Ê±ÇåÀíijЩ±íµÄÊý¾Ý£¬
»òÕßÊǶ¨Ê±µÄ½«Ä³Ð©±íµÄÊý¾Ýµ¼³öexcel£¡
ÔÚÏߵȴý£¬¼±¼±¼±£¬×îºÃÊÇÏêϸ²½Ö裡
֮ǰÎÒ×öµÄ×÷ÒµÓеãÎÊÌ⣡
°ïUP

²Î¿¼:http://hi.baidu.com/toiota ......

Çë½ÌSQLSERVERµÄÁ½¸öÎÊÌâ - MS-SQL Server / ÒÉÄÑÎÊÌâ

1¡£ÔõÑùʹxp_cmdshellÄÜÍêÕûÊä³ö³¬¹ý255¸ö×Ö·ûµÄ×Ö·û´®¡£
2¡£select ʱ£¬¼ìË÷ËÙ¶ÈÊÇÓëfromºóµÄ TABLE˳ÐòÓйأ¬»¹ÊÇÓëwhereÌõ¼þµÄ˳ÐòÓйØ(TABLEÊý¾Ý¶àÉÙ )
ÔÚϵͳÊôÐÔÉ趨ÀïÓиöÑ¡Ïî,¿ÉÒÔÐ޸ĵ¥×Ö¶ÎÊä³ö×ÖÊýÏÞÖÆ. ......

sql ÎÊÌâ - MS-SQL Server / »ù´¡Àà

ÐèÇóÈçÏ£º
ѧԺ academy£¨aid,aname£©
°à¼¶ class£¨cid,cname,aid£©
ѧÉú stu(sid,sname,aid,cid)
סËÞÇø region(rid,rname)
ËÞÉáÂ¥ build(bid,rid,bnote) bnoteÊÇ¡®ÄС¯/¡®Å®¡¯
ËÞÉá dorm(did,rid,bid£¬bedn ......

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ºÅ