CSDNµÄÊý¾Ý³ö´íÖ±½ÓÅ׳ö´íÎóSQLÎÄ
½ñÌìÔÚÉÏCSDN¿Õ¼äµÄʱºò£¬Êý¾Ý¿â³ö´íÖ±½ÓÅ׳öSQLÎÄÁË£¬ÏûÏ¢ÈçÏ£º
MySQL Error
Message
: MySQL Query Error
SQL
: SELECT main.*, field.* from uchome_space main, uchome_spacefield field
WHERE field.sex='1' AND field.uid=main.uid
ORDER BY main.viewnum DESC LIMIT 0,100
Error
: Incorrect key file for table '/tmp/#sql_2a52_0.MYI'; try to repair it
Errno.
: 126
Ò»°ãÀ´ËµÕâÖÖ´íÎóµÄÏûÏ¢ÊDz»ÈÃÍⲿ¿´µÄ£¬¾ÍÊÇcatchºó±¨Ò»¸öϵͳ´í¾ÍºÃÁË¡£
Èç¹ûÉÏÃæµÄÕâ¸öÑù×ӵĻ°£¬¼´Ê¹²»¶®µÃÈËÒ²ÖªµÀÎÒÃǵÄÓõÄMySQLÊý¾Ý¿â¡£»¹ÓоÍÊÇ¿´µ½Á˱íÃûºÍ×Ö¶ÎÃû£¬ºÍ¼ìË÷Âß¼¡£
ÔÚ°²È«ÐÔÉϲ¢²»ÊÇÖµµÃÌᳫµÄ¡£
Ïà¹ØÎĵµ£º
ÔÚ±¾ÎÄÖУ¬GetDate()»ñµÃµÄÈÕÆÚÓÉÁ½²¿·Ö×é³É£¬·Ö±ðÊǽñÌìµÄÈÕÆں͵±Ê±µÄʱ¼ä£ºSelect GetDate() ÓÃDateName()¾Í¿ÉÒÔ»ñµÃÏàÓ¦µÄÄê¡¢Ô¡¢ÈÕ£¬È»ºóÔÙ°ÑËüÃÇÁ¬½ÓÆðÀ´¾Í¿ÉÒÔÁË£º
¡¡¡¡
Select Datename(year,GetDate())+'-'+Datename(month,GetDate())+'-'+Dat ......
1. »ñÈ¡Êý¾Ý¿âÖе±Ç°Ô·ݵÄÏà¹ØÊý¾Ý
SELECT WorkerSortID, SUM(WorkerCount) AS WorkerMothCount
from WorkerRecord
WHERE (YEAR(WorkerTime) = YEAR({ fn NOW() })) AND (MONTH(WorkerTime)
= MONTH({ fn NOW() })) AND (WorkerCount > 0) AND (WorkerID = 'wy')
GROUP BY Worker ......
SQL Server Ë÷Òý½á¹¹¼°ÆäʹÓã¨ËÄ£©
×÷Õߣºfreedk
Ò»¡¢ÉîÈëdz³öÀí½âË÷Òý½á¹¹
¶þ¡¢¸ÄÉÆSQLÓï¾ä
Èý¡¢ÊµÏÖСÊý¾ÝÁ¿ºÍº£Á¿Êý¾ÝµÄͨÓ÷ÖÒ³ÏÔʾ´æ´¢¹ý³Ì
¾Û¼¯Ë÷ÒýµÄÖØÒªÐÔºÍÈçºÎÑ¡Ôñ¾Û¼¯Ë÷Òý
¡¡¡¡ÔÚÉÏÒ»½ÚµÄ±êÌâÖУ¬±ÊÕßдµÄÊÇ£ºÊµÏÖСÊý¾ÝÁ¿ºÍº£Á¿Êý¾ÝµÄͨÓ÷ÖÒ³ÏÔʾ´æ´¢¹ý³Ì¡£ÕâÊÇÒòΪÔÚ½«±¾´æ´¢¹ý³ÌÓ¦ÓÃÓÚ“°ì ......
ÔÚÐèÒª²âÊÔsqlÓï¾ä»òÕß´æ´¢¹ý³ÌÐÔÄܵÄʱºò¿ÉÒÔÓõÃÉÏ
CHECKPOINT --ÓÃÓÚ¼ì²éµ±Ç°¹¤×÷µÄÊý¾Ý¿âÖб»¸ü¸Ä¹ýµÄÊý¾ÝÒ³»òÈÕÖ¾Ò³£¬²¢½«ÕâЩÊý¾Ý´ÓÊý¾Ý»º³åÆ÷ÖÐÇ¿ÖÆдÈëÓ²ÅÌ
GO
DBCC FreeProcCache --´Ó»º³å³ØÖÐɾ³ýËùÓлº³åÇø
DBCC DropCleanBuffers&nbs ......
Ò»¶Îʱ¼äÀ´£¬Ã¿ÌìµÄ¹¤×÷¶¼±È½ÏÔÓ£¬vb,asp,c#,sql£¬Ã¿Ï×÷¶¼Òª¸ã£¬ÊµÔÚÊÇÀÛ£¡¹¤×÷Ö®Ó࣬ÏëÏ빫˾ºÍ¹¤×÷µÄÇé¿ö£¬¿´À´ÊÇÓбØÒª»»¸ö»·¾³ÁË¡£²»¹ýÒ²ÒªÏÈ°ÑÄ¿Ç°µÄ¹¤×÷´¦ÀíÍê³É°¡¡£
×î½üÓÖÓöµ½Ò»¸öÎÊÌ⣺һ¼Ò¿Í»§Ê¹ÓÃÖеÄÊý¾Ý¿â£¬ÈÕÖ¾ÎļþÒì³£Ôö´ó£¬Æ½¾ùÿÌìÔö¼Ó´óÔ¼Ò»¸öG£¬¶øÊý¾ÝÎļþ±ä» ......