sqlserver count,order by ²éѯÂý
±íÖÐÊý¾Ý 700ÍòÌõ×óÓÒ£¬29¸ö×ֶΣ¬×Ô¶¯Ôö³¤ÁÐÉèΪÖ÷¼ü£¬ ʹÓÃcount£¨1£© ²éѯ×ÜÌõÊýÐèÒª1·ÖÖÓ£¬
select top 1000 ×Ö¶ÎÃû from ±í order by ʱ¼ä(¸Ã×Ö¶ÎÓÐÖظ´ÖµºÍnullÖµ) ÕâÑùµÄÓï¾ä²éѯ¸üÊÇÂýµÃ»ù±¾²é²»³öÀ´¡£¶øÇÒ¾ÍÊÇÔÚ×Ô¼ºµÄ±¾»ú²âÊԵġ£²»ÖªµÀÊÇʲôÔÒòÇë¸÷λ´Í½Ì¡£
create index at time
¶Ô ʱ¼ä½¨Á¢¸öË÷ÒýÊÔÊÔ
Ò»ÊÇË÷Òý£¡
»¹ÓÐÊÔÒ»ÏÂÓ÷ÖÇø±í£¡
SQL code:
ʲôÊÇÊý¾Ý¿â·ÖÇø£¿
Êý¾Ý¿â·ÖÇøÊÇÒ»ÖÖ¶Ô±íµÄºáÏò·Ö¸î£¬Sql server 2005ÆóÒµ°æºÍÖ®ºóµÄSql server°æ±¾²ÅÌṩÕâÖÖ¼¼Êõ£¬ÕâÖÖ¶Ô±íµÄºáÏò·Ö¸î²»Í¬ÓÚ2000Öеıí·Ö¸î£¬Ëü¶Ô·ÃÎÊÓû§ÊÇ͸Ã÷µÄ£¬Óû§²¢²»»á¸Ð¾õµÄ±í±»ºáÏò·Ö¸îÁË¡££¨2000ÖеıíºáÏò·Ö¸îÊǽ¨n¸ö±íÀýÈ簴ʱ¼ä½¨±íÿÔÂÒ»¸ö±í£¬±íÃû²»Í¬£¬×îºóÐèÒª×öÒ»¸ö´óÊÓͼ£©
¹ØÓÚ¾ßÌåµÄÈçºÎ×ö·ÖÇø£¬Çë²Î¿¼Êý¾Ý¿â·ÖÇøÑÝÁ·http://www.cnblogs.com/yukaizhao/archive/2008/05/07/sql_partition_test.html
ΪʲôҪ·ÖÇø£¿
ÏÔ¶øÒ×¼û·ÖÇøÊÇΪÁËÌá¸ßÊý¾Ý¿âµÄ¶ÁдÐÔÄÜ£¬Ìá¸ßÊý¾Ý¿âµÄЧÂÊ£»
·ÖÇøÊÇ·ñ×ÜÊÇ¿ÉÒÔÌá¸ßЧÂÊ£¿
·ÖÇøÊÇÒ»°ÑË«Èн££¬²¢²»×ÜÄÜÌá¸ßЧÂÊ£¬ÕâºÍ¾ßÌåÇé¿öÓйØϵ¡£
Ö®ËùÒÔÓзÖÇø¼¼Êõ£¬·ÖÇø¼¼ÊõÓõĺõĻ°¿ÉÒÔÌá¸ßÐÔÄÜ£¬ÊÇÒòΪһ·½Ãæ·ÖÇø°ÑÒ»´ó¿éÊý¾Ý·Ö³ÉÁËnС¿é£¬ÕâÑù²éѯµÄʱºòºÜ¿ì¶¨Î»µ½Ä³Ò»Ð¡¿éÉÏ£¬ÔÚС¿éÖÐÑ°Ö·Òª¿ìºÜ¶à£»ÁíÒ»·½ÃæCPU±È´ÅÅÌIO¿ìºÜ¶à±¶£¬¶øÓ²¼þÉÏÓÖÓжà¸ö´ÅÅÌ£¬»òÕßÊÇRAID£¨Á®¼Û´ÅÅÌÈßÓàÕóÁУ©£¬¿ÉÒÔÈÃÊý¾Ý¿âÇý¶¯CPUͬʱȥ¶Áд²»Í¬µÄ´ÅÅÌ£¬ÕâÑù²ÅÓпÉÄÜ¿ÉÒÔÌá¸ßЧÂÊ¡£
·ÖÇøÔÚÓÐЩʱºò²¢²»ÄÜÌá¸ß¶ÁдЧÂÊ£¬±ÈÈç˵ÎÒÃǾ³£¿´µ½µÄ°´ÕÕÈÕÆÚ×Ö¶ÎÈ¥·ÖÇøMSDNÀý×Ó£¬Õ
Ïà¹ØÎÊ´ð£º
´úÂ룺
try{
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
con= DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost: ......
Êý¾Ý10WÌõÒÔÉÏ,wm6.5ƽ̨,ÄÚ´æÓÐÏÞ
C# code:
private void connserver()
{
Cursor.Current = Cursors.WaitCursor;
try
{
......
ÏÖÒ»·þÎñÆ÷£¬Ö§³ÖRAID5/RAID1+0µÈ£¬ÓÐ4¿éÒ»ÑùÐͺŵÄÓ²ÅÌ£¬°²×°ÁËRAID¿¨¡£
ÎÒËÑË÷ÁËÂÛ̳£¬ÓÐ˵Ҫ°ÑÊý¾Ý¿âÎļþ·Ö²¼ÔÚ²»Í¬´ÅÅÌ£¬µ«ÊÇ£¬×öraid5»òraid10ºó£¬4¿éÓ²Å̺ÃÏñ³ÉΪһÌåÁË£¬ÎÒ·Ö3¸ö·ÖÇø£¬Îļþ·Ö²¼ÔÚ²»Í¬· ......
±ÈÈçsqlÓï¾äÊÇ£º
SQL code:
select top 300
CA01.A_id as '±ä¶¯´ÎÊý',
CA01.A0188 as 'ÈËÔ±id',
CA01.apname as 'ÉóÅúÕß',
CA01.CA0100 as 'È·ÈÏ״̬',
CA01.CA0101 as '±ä¶¯ÀàÐÍ',
CA01.CA0102 as 'Éê ......