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

mysql¶à±íÁªºÏ²éѯ²¢Í³¼Æ

ÍƹãµØµã±ípromotion_addr×ֶΣºname£¬id
µç»°±¨¿¢±íunicom_record×ֶΣºdate, sheet_id£¨¹ØÁªsheet±íid£©
±¨µ¥±ísheet×ֶΣºid,promotion_addr_id£¨¹ØÁªpromotion_addr±íid£©
ÒªÇóͳ¼Æij¸öÔÂÒѱ¨¿¢¸÷ÍƹãµØµãµÄÍƹã¸öÊý£»
SELECT
p.name, count(*)
from
unicom_record AS ur
Left Join sheet AS s ON ur.sheet_id = s.id
Left Join promotion_addr AS p ON s.promotion_addr_id = p.id
WHERE
ur.status =  'COMPLETE' AND
ur.`date` >=  '2010-03-01' AND
ur.`date` <  '2010-04-01'
GROUP BY
p.id
(»òʹÓÃbetween andÓï¾ä)


Ïà¹ØÎĵµ£º

MySQL´æ´¢¹ý³ÌÒÔ¼°ÔÚJAVAÖеijÌÐòµ÷ÓÃ

               ´æ´¢¹ý³ÌÊÇÒ»ÖÖ´æ´¢ÔÚÊý¾Ý¿âÖеijÌÐò£¨¾ÍÏñÕý¹æÓïÑÔÀïµÄ×Ó³ÌÐòÒ»Ñù£©£¬×¼È·µÄÀ´Ëµ£¬MySQLÖ§³ÖµÄ“routines£¨Àý³Ì£©”ÓÐÁ½ÖÖ£ºÒ»ÊÇÎÒÃÇ˵µÄ´æ´¢¹ý³Ì£¬ ¶þÊÇÔÚÆäËûSQLÓï¾äÖпÉÒÔ·µ»ØÖµµÄº¯Êý£¨Ê¹ÓÃÆðÀ´ºÍMysqlԤװÔصĺ¯ÊýÒ ......

mysqlµÄÅäÖÃÎļþmy.ini

# MySQL Server Instance Configuration File
# ----------------------------------------------------------------------
# Generated by the MySQL Server Instance Configuration Wizard
#
#
# Installation Instructions
# ----------------------------------------------------------------------
#
# On Li ......

±¸·ÝMySQLÐèÒªÖªµÀµÄÊ®¼þÊÂ

ÄãʹÓùý±ðÈ˵ı¸·Ý·½°¸À´±¸·ÝÄãµÄMySQLÊý¾ÝÂð?ÄãÓжà¹ØÐÄÄãµÄÊý¾Ý?Äã¸ÒÈ·¶¨ÄãÏÖÔÚÕýÔÚÔËÐеĽű¾¾ÍÊÇ¿É¿¿µÄ£¬¿É»Ö¸´µÄ±¸·Ý£¬¶øÇÒÔÚÔËÐйý³ÌÖв»»áÓ°ÏìÄãµÄ¹Ø¼ü×÷ÒµÂð?ÔڻشðÕâ¸öÎÊÌâ֮ǰ£¬ÏȻشðÏÂÃæÊ®¸öÎÊÌâ°É£º
¡¡¡¡1. ±¸·ÝÒªÇóÍ£Ö¹Êý¾Ý¿âÂð?Èç¹û²»ÐèÒª£¬ÄÇô±¸·ÝµÄʱºò»áÓ°Ïìʲô?¿éÉ豸?I/O¸ºÔØ?»º³å?»òÕßÊÇÆäËû?
¡¡ ......

MySQL¿Í»§¶ËÃüÁîÐÐÓ¦Óü¼ÇÉ

1.ʵÏÖTAB¼ü²¹È«
SHELL>vi /etc/my.cnf
[mysql]
#no-auto-rehash
auto-rehash
SHELL>reboot mysqld
note: 1.ÒªÏÈuseµ½Ä³¸öÊý¾Ý¿âÏ£»2.Òª²¹È«µÄ¹Ø¼ü×ÖÐèÒª´óд¡£
2.promptÈòÙ×÷¸ü¼ÓÇå³þ
mysql>prompt \u@\h(\d) \r:\m:\s    (ÁÙʱ)
[mysql]   £¨³¤¾Ã£©
prompt=\\u@\\h
3.pagerÈÃä ......

IIS6.0+PHP+MYSQLÅäÖÃ

Win2003server Ï¼ÜÉèPHPWind²úÆ·»·¾³
°²×°Ç°×¼±¸:1¡¢°²×°ºÃiis6
            
             
            
&nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ