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

MSSQL ÐÐÊýͳ¼ÆµÄÎÊÌâ - MS-SQL Server / ÒÉÄÑÎÊÌâ

ÓÐÁ½¸ö±í£¬ÊýÁ¿¼¶ÔÚ3000w×óÓÒ£¬
Ïë²é¿´¾ßÌåµÄÊýÁ¿£¬ÓÃselect Count(*) ËÙ¶ÈÌ«Âý£¬

֮ǰ¿´µ½ËµÔÚsysindexesÖÐÓÐrows ÁУ¬ µ«ÊÇÎÒ·¢ÏÖ£¬ÕâÁ½¸öµÄÖµ²»Ò»Ñù£¬Ôõô»ØÊ°¡£¿

лл
ÓÐÈËÄܻشðÒ»ÏÂÂð? ²»ÊǺÜÃ÷°×°¡

ÒýÓÃ
ÓÐÁ½¸ö±í£¬ÊýÁ¿¼¶ÔÚ3000w×óÓÒ£¬
Ïë²é¿´¾ßÌåµÄÊýÁ¿£¬ÓÃselect Count(*) ËÙ¶ÈÌ«Âý£¬

֮ǰ¿´µ½ËµÔÚsysindexesÖÐÓÐrows ÁУ¬ µ«ÊÇÎÒ·¢ÏÖ£¬ÕâÁ½¸öµÄÖµ²»Ò»Ñù£¬Ôõô»ØÊ°¡£¿

лл


»á²»»áÊÇÄãcount()²éѯÍêµÄʱºò£¬ÁíÒ»¸öÓû§ÔÚÔö¼Ó»òɾ³ý¼Ç¼£¬µ¼ÖÂÄãÔÙ²éѯsysindexes±íµÄʱºò£¬¼Ç¼²»Ò»Ö¡£

ѧϰ£¡

sysindexes±íͳ¼Æ³öÀ´µÄÊǸö²»Ì«¾«È·µÄÖµ ÒòΪsql server²»ÊÇʵʱ¸üÐÂsysindexesÖеÄrowsÁУ¬¶øÊǶ¨Ê±¸üС£


Ïà¹ØÎÊ´ð£º

ÇóÒ»sqlÓï¾ä - MS-SQL Server / ÒÉÄÑÎÊÌâ

ÏÖÔÚÓÐÁ½ÕÅ±í£ºÎÄÕÂÖ÷±íA(articleId,articleTitle)£¬ÎÄÕÂÆÀÂÛ±íB(commentId,articleId,commentTitle)
ÏÖÔÚÎÒÏëʵÏÖÕâÑùµÄ¹¦ÄÜ£ºÁгöÎÄÕÂÁÐ±í£¬ÆäÖÐÿƪÎÄÕ±êÌâÏÂÃæÁгö´ËÎÄÕµÄÇ°2¸öÎÄÕÂÆÀÂÛ£¬ÇëÎÊsqlÓï¾äÔõôд°¡ ......

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·ÖÒ³ÓëOracle·ÖÒ³µÄÒÉÎÊ£¿ - Java / Web ¿ª·¢

ÕâÀïÏëÁ˽âÏ£¬¹ØÓÚSQL ServerÖзÖÒ³ºÍOracleÖзÖÒ³£»
ƽ³£Ð´Ó¦ÓóÌÐòµÄʱºò£¬±ÈÈçÓõÄÓïÑÔÊÇJava£¬ÓиöÁбíÒ³Ã棬ÐèÒª¶ÔÊý¾Ý·ÖÒ³ÏÔʾ£»
ÕâÀïÒª·ÖÒ³ÄѵÀ²»ÐèÒª½èÖúJava£¬¶øÖ±½ÓsqlÄÜÖªµÀ·ÖÒ³Âð£¬ÆðÂëÒ²Òª´«¸öÒ³Âë½ ......

Çóһʱ¼ä±È½ÏµÄSQL Ö¸Áî - MS-SQL Server / »ù´¡Àà

±íÊý¾Ý
COL1 COL2 COL2 COL4 COL5
----------------------------------------------------------------------------------------------
2010-05-05 00:00 ......

¹ØÓÚSQLÓï¾äORµÄÎÊÌâ - Oracle / ¸ß¼¶¼¼Êõ

ͨ¹ýNAME×Ö¶ÎÌõ¼þ²éѯһ¸öÊý¾Ý±í£¬¼ÙÉèÎÒÓÐ100¸öÐÕÃû£¬ÓÐÒÔÏÂÁ½¸ö·½·¨£¬
·½·¨1£º
°Ñ100¸öName ×é³ÉÒ»¸öSQLÓï¾ä£¬±ÈÈç Select * from tmp_table where Name='ÕÅÈý' or Name ='ÀîËÄ' Or ...Or Name='µÚÒ»°Ù¸öÐÕÃû'
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ