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

sqlÓÅ»¯Ö®:ÉîÈëdz³öÀí½âË÷Òý(ϵÁжþ)(½²½â·Ç³£Í¸³¹)

(ËÄ)ÆäËûÊéÉÏûÓеÄË÷ÒýʹÓþ­Ñé×ܽá
¡¡¡¡1¡¢ÓþۺÏË÷Òý±ÈÓò»ÊǾۺÏË÷ÒýµÄÖ÷¼üËٶȿì
¡¡¡¡ÏÂÃæÊÇʵÀýÓï¾ä£º(¶¼ÊÇÌáÈ¡25ÍòÌõÊý¾Ý)
¡¡¡¡select gid,fariqi,neibuyonghu,reader,title from Tgongwen
¡¡¡¡where fariqi='2004-9-16'
¡¡¡¡Ê¹ÓÃʱ¼ä£º3326ºÁÃë
¡¡¡¡select gid,fariqi,neibuyonghu,reader,title from Tgongwen where gid<=250000
¡¡¡¡Ê¹ÓÃʱ¼ä£º4470ºÁÃë
¡¡¡¡ÕâÀÓþۺÏË÷Òý±ÈÓò»ÊǾۺÏË÷ÒýµÄÖ÷¼üËٶȿìÁ˽ü1/4¡£
¡¡¡¡2¡¢ÓþۺÏË÷Òý±ÈÓÃÒ»°ãµÄÖ÷¼ü×÷order byʱËٶȿ죬ÌرðÊÇÔÚСÊý¾ÝÁ¿Çé¿öÏÂ
¡¡¡¡select gid,fariqi,neibuyonghu,reader,title from Tgongwen order by fariqi
¡¡¡¡ÓÃʱ£º12936
¡¡¡¡select gid,fariqi,neibuyonghu,reader,title from Tgongwen order by gid
¡¡¡¡ÓÃʱ£º18843
¡¡¡¡ÕâÀÓþۺÏË÷Òý±ÈÓÃÒ»°ãµÄÖ÷¼ü×÷order byʱ£¬ËٶȿìÁË3/10¡£ÊÂʵÉÏ£¬Èç¹ûÊý¾ÝÁ¿ºÜСµÄ»°£¬Óþۼ¯Ë÷Òý×÷ΪÅÅÐòÁÐÒª±ÈʹÓ÷Ǿۼ¯Ë÷ÒýËٶȿìµÃÃ÷ÏԵĶà;¶øÊý¾ÝÁ¿Èç¹ûºÜ´óµÄ»°£¬Èç10ÍòÒÔÉÏ£¬Ôò¶þÕßµÄËٶȲî±ð²»Ã÷ÏÔ¡£
¡¡¡¡3¡¢Ê¹ÓþۺÏË÷ÒýÄÚµÄʱ¼ä¶Î£¬ËÑË÷ʱ¼ä»á°´Êý¾ÝÕ¼Õû¸öÊý¾Ý±íµÄ°Ù·Ö±È³É±ÈÀý¼õÉÙ£¬¶øÎÞÂÛ¾ÛºÏË÷ÒýʹÓÃÁ˶àÉÙ¸ö
¡¡¡¡select gid,fariqi,neibuyonghu,reader,title from Tgongwen
¡¡¡¡where fariqi>'2004-1-1'
¡¡¡¡ÓÃʱ£º6343ºÁÃë(ÌáÈ¡100ÍòÌõ)
¡¡¡¡select gid,fariqi,neibuyonghu,reader,title from Tgongwen
¡¡¡¡where fariqi>'2004-6-6'
¡¡¡¡ÓÃʱ£º3170ºÁÃë(ÌáÈ¡50ÍòÌõ)
¡¡¡¡select gid,fariqi,neibuyonghu,reader,title from Tgongwen
¡¡¡¡where fariqi='2004-9-16'
¡¡¡¡ÓÃʱ£º3326ºÁÃë(ºÍÉϾäµÄ½á¹ûһģһÑù¡£Èç¹û²É¼¯µÄÊýÁ¿Ò»Ñù£¬ÄÇôÓôóÓںź͵ÈÓÚºÅÊÇÒ»ÑùµÄ)
¡¡¡¡select gid,fariqi,neibuyonghu,reader,title from Tgongwen
¡¡¡¡where fariqi>'2004-1-1' and fariqi<'2004-6-6'
¡¡¡¡ÓÃʱ£º3280ºÁÃë
4 ¡¢ÈÕÆÚÁв»»áÒòΪÓзÖÃëµÄÊäÈë¶ø¼õÂý²éѯËÙ¶È
¡¡¡¡ÏÂÃæµÄÀý×ÓÖУ¬¹²ÓÐ100ÍòÌõÊý¾Ý£¬2004Äê1ÔÂ1ÈÕÒÔºóµÄÊý¾ÝÓÐ50ÍòÌõ£¬µ«Ö»ÓÐÁ½¸ö²»Í¬µÄÈÕÆÚ£¬ÈÕÆÚ¾«È·µ½ÈÕ;֮ǰÓÐÊý¾Ý50ÍòÌõ£¬ÓÐ5000¸ö²»Í¬µÄÈÕÆÚ£¬ÈÕÆÚ¾«È·µ½Ãë¡£
¡¡¡¡select gid,fariqi,neibuyonghu,reader,title from Tgongwen
¡¡¡¡where fariqi>'2004-1-1' order by fariqi
¡¡¡¡ÓÃʱ£º6390ºÁÃë
¡¡¡¡select gid,fariqi,neibuyonghu,reader,title from Tgongwen
¡¡¡¡where fariqi<'2004-1-1' order by fariqi
¡


Ïà¹ØÎĵµ£º

[ÊÕ£] ÓÃsqlite Ö´Ðбê×¼ sql Óï·¨

http://www.umgr.com/blog/PostView.aspx?bpId=36294
 1. Ö´ÐÐsqlÓï¾ä
int sqlite3_exec(sqlite3*£¬ const char *sql£¬ sqlite3_callbacksql Óï·¨
£¬ void *£¬  char **errmsg );
Õâ¾ÍÊÇÖ´ÐÐÒ»Ìõ sql Óï¾äµÄº¯Êý¡£
µÚ1¸ö²ÎÊý²»ÔÙ˵ÁË£¬ÊÇÇ°Ãæopenº¯ÊýµÃµ½µÄÖ¸Õ롣˵ÁËÊǹؼüÊý¾Ý½á¹¹¡£
µÚ2¸ö²ÎÊýconst char ......

SQLÓï·¨×ܽá

ÕâÊÇÎÒ±ßѧ±ß×ܽáµÄ£¬×ܹ²»¨ÁËÒ»ÌìÒ»Ò¹µÄʱ¼ä£¬²é×ÊÁϺͿ´ÊÓƵÍê³ÉµÄ£¬µ«ÎÒ¶Ôµ¥Ðк¯ÊýºÍ¶àÐк¯ÊýûÓÐ×ö¹ý¶àµÄÑо¿£¬ÒòΪÕß¿ÉÒÔ²éÎĵµ¡£»¹ÓоÍÊǶà±í²éѯÑо¿Ò²±È½Ïdz£¬Õâ¿ÉÒÔÔÚÒÔºóÓõ½µÄʱºòÔÚ¾ßÌåÑо¿¡£   »¹ÓоÍÊÇÒªÊìϤÊý¾Ý¿âµÄ²Ù×÷£¬Ôöɾ¸Ä²é£¬ÕâЩ¶¼ÒªÏ൱ÊìÁ·£¬Íü¼ÇʱҪ¼°Ê±¿´±Ê¼Ç¡£
SQL
1....... ......

ÔÚSQL Server 2005ÖÐʵÏÖÒì²½´¥·¢Æ÷¼Ü¹¹

ÔÚSQL Server 2005Êý¾Ý¿âÖУ¬Í¨¹ýÐÂÔöµÄService Broker¿ÉÒÔʵÏÖÒì²½´¥·¢Æ÷µÄ´¦Àí¹¦ÄÜ¡£±¾ÎÄÌṩһÖÖʹÓÃService BrokerʵÏÖµÄͨÓÃÒì²½´¥·¢Æ÷·½·¨¡£
ÔÚ±¾Õâ¸ö·½·¨ÖУ¬Í¨¹ýService Broker¹¹ÔìÒì²½´¥·¢Æ÷´¦Àí¼Ü¹¹£¬¶ÔÓÚҪʹÓÃÕâÖּܹ¹µÄ±í£¬Ö»ÐèÒª´´½¨ÏàÓ¦µÄ´¥·¢Æ÷¼°´¦Àí´¥·¢Æ÷ÖÐÊý¾ÝµÄ´æ´¢¹ý³Ì£¬²¢ÇÒÔÚÒì²½´¥·¢Æ÷¼Ü¹¹ÖÐµÇ¼Ç ......

SQLÐÔÄܵ÷УÃüÁî

DBCC DROPCLEANBUFFERS  --Çå³ý»º³åÇø£¬±ãÓڶԱȲéѯʱ¼äºÍÐÔÄÜ£¬²»ÊÕ»º´æµÄÓ°Ïì
SET STATISTICS TIME  ON --ÏÔʾ·ÖÎö¡¢±àÒëºÍÖ´Ðи÷Óï¾äËùÐèµÄºÁÃëÊý
sp_spaceused NSDoctorAdvice0705 -- ²é¿´±í¿Õ¼ä´óС
ÎÊÌâÌÖÂÛ£º
ÊÇ·ñÔö¼ÓÒ»¸ö¶ÀÁ¢µÄÎļþ×飬ÓÃÀ´´æ·ÅË÷Òý¡£Ä¿Ç°Êý¾Ý¿âµÄÖ»ÓÐÒ»¸öÎļþ×飬Îļþ·Ç³£´óµÄ»°£¬ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ