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

SQL Access Advisor

Oracle Êý¾Ý¿â 10g ÌṩÁË´óÁ¿°ïÖú³ÌÐò£¨»ò“¹ËÎʳÌÐò”£©£¬¿É°ïÖúÄú¾ö¶¨×î¼Ñ²Ù×÷Á÷³Ì¡£ÆäÖÐÒ»¸öʾÀýÊÇ SQL Tuning Advisor£¬Ëü¿ÉÒÔÌṩÓйزéѯµ÷ÕûÒÔ¼°ÔÚÁ÷³ÌÖÐÑÓ³¤Õû¸öÓÅ»¯¹ý³ÌµÄ½¨Òé¡£
µ«Ç뿼ÂÇÒÔϵ÷Õû°¸Àý£º¼ÙÉèÒ»¸öË÷ÒýȷʵÓÐÖúÓÚij¸ö²éѯ£¬µ«¸Ã²éѯִֻÐÐÒ»´Î¡£ÕâÑù£¬¼´Ê¹¸Ã²éѯ¿ÉÒÔµÃÒæÓÚ´ËË÷Òý£¬µ«´´½¨Ë÷ÒýµÄ³É±¾Ò²»á³¬³öÆä´øÀ´µÄºÃ´¦¡£Òª°´ÕâÖÖ·½Ê½·ÖÎö°¸Àý£¬ÄúÐèÒªÁ˽â²éѯµÄ·ÃÎÊƵÂʺÍÔ­Òò¡£
ÁíÒ»¸ö¹ËÎʳÌÐò (SQL Access Advisor) ¿ÉÖ´ÐÐÕâÖÖÀàÐ͵ķÖÎö¡£³ýÁËÏñÔÚ Oracle Êý¾Ý¿â 10g ÖÐÒ»Ñù¿ÉÒÔ·ÖÎöË÷Òý¡¢ÎﻯÊÓͼµÈ£¬Oracle Êý¾Ý¿â 11g ÖÐµÄ SQL Access Advisor »¹¿ÉÒÔ·ÖÎö±íºÍ²éѯÒÔʶ±ð¿ÉÄܵķÖÇø²ßÂÔ — ÕâÔÚÉè¼Æ×î¼Ñģʽʱ¿ÉÒÔÌṩºÜ´ó°ïÖú¡£ÔÚ Oracle Êý¾Ý¿â 11g ÖУ¬SQL Access Advisor ÏÖÔÚ¿ÉÒÔÌṩÓëÕû¸ö¸ºÔØÏà¹ØµÄ½¨Ò飬°üÀ¨¿¼ÂÇ´´½¨³É±¾ºÍά»¤·ÃÎʽṹ¡£
ÔÚ±¾ÎÄÖУ¬Äú½«Á˽âÐ嵀 SQL Access Advisor ÈçºÎ½â¾ö³£¼ûÎÊÌâ¡££¨×¢£º³öÓÚÑÝʾĿµÄ£¬ÎÒÃǽ«Í¨¹ýÒ»¸öÓï¾äÑÝʾÕâ¸ö¹¦ÄÜ£»µ«ÊÇ£¬Oracle ½¨ÒéʹÓà SQL Access Advisor À´°ïÖúµ÷ÕûÕû¸ö¸ºÔØ£¬¶ø²»Ö»ÊÇÒ»¸ö SQL Óï¾ä¡££©
ÎÊÌâ
ÏÂÃæÊÇÒ»¸öµäÐÍÎÊÌâ¡£Ó¦ÓóÌÐò·¢³öÁËÒÔÏ SQL Óï¾ä¡£¸Ã²éѯËƺõÒªÏûºÄ´óÁ¿×ÊÔ´²¢ÇÒËٶȺÜÂý¡£

select store_id, guest_id, count(1) cnt
from res r, trans t
where r.res_id between 2 and 40
and t.res_id = r.res_id
group by store_id, guest_id
/
¸Ã SQL Éæ¼°Á½¸ö±í£¬¼´ RES ºÍ TRANS£»ºóÕßÊÇÇ°ÕßµÄ×Ó±í¡£ÄúÐèÒªÕÒµ½Ìá¸ß²éѯÐÔÄܵĽâ¾ö·½°¸ — SQL Access Advisor ÕýÊÇ×îºÏÊʵŤ¾ß¡£
Äú¿ÉÒÔͨ¹ýÃüÁîÐлò Oracle ÆóÒµ¹ÜÀíÆ÷Êý¾Ý¿â¿ØÖÆÓë¹ËÎʳÌÐò½øÐн»»¥£¬µ«Ê¹Óà GUI ¿ÉÒÔÌṩ¸üºÃµÄÖµ£¨GUI ¿ÉÈÃÄú½«½â¾ö·½°¸¿ÉÊÓ»¯£¬²¢½«Ðí¶àÈÎÎñ¼ò»¯Îª¼òµ¥µÄµã»÷²Ù×÷£©¡£
ҪʹÓÃÆóÒµ¹ÜÀíÆ÷ÖÐµÄ SQL Access Advisor ½â¾ö SQL ÖеÄÎÊÌ⣬Çë×ñÑ­ÒÔϲ½Öè¡£
µ±È»£¬µÚÒ»¸öÈÎÎñÊÇÆô¶¯ÆóÒµ¹ÜÀíÆ÷¡£ÔÚ Database Ö÷Ò³ÉÏ£¬ÏòϹö¶¯µ½Ò³Ãæµ×²¿£¬Äú½«ÔÚÕâÀï¿´µ½¼¸¸ö³¬Á´½Ó£¬ÈçÏÂͼËùʾ£º

Ôڸò˵¥ÖУ¬µ¥»÷ Advisor Central£¬Õ⽫ÏÔʾһ¸öÓëÏÂͼÀàËƵÄÆÁÄ»¡£ÏÂÃæ½öÏÔʾÁ˸ÃÆÁÄ»µÄ¶¥²¿¡£

µ¥»÷ SQL Advisors£¬Õ⽫ÏÔʾһ¸öÓëÏÂͼÀàËƵÄÆÁÄ»¡£

ÔÚ¸ÃÆÁÄ»ÖУ¬Äú¿ÉÒԼƻ® SQL Access Advisor »á»°£¬²¢Ö¸¶¨ÆäÑ¡Ïî¡£¹ËÎʳÌÐò±ØÐëÊÕ¼¯Ò»Ð©ÒªÊ¹ÓÃµÄ SQL Óï¾ä¡£×î¼òµ¥µÄÑ¡Ïî¾ÍÊÇͨ¹ý Current and Recent SQL Activity ´Ó¹²Ïí³Ø


Ïà¹ØÎĵµ£º

[ÊÕ£] ÓÃ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 ......

PL/SQLÖÐGOTOÓï¾äºÍ±êÇ©

ÔÚPL/SQLÖÐÒ²ÌṩGOTOÓï¾ä,ÆäÓï·¨ÊÇ
GOTO label;
ÕâÀïlabelÊÇÔÚPL/SQL¿éÖж¨ÒåµÄ±êÇ©.±êÇ©ÊÇÓÃË«¼ýÍ·À¨ºÅÀ¨ÆðÀ´µÄ.µ±Ö´ÐÐGOTOÓï¾äµÄʱºò,¿ØÖÆ»áÁ¢¼´×ªµ½ÓɱêÇ©±êʶµÄÓï¾ä.
1.¶ÔÓÚGOTOµÄÏÞÖÆ
a.¶ÔÓÚ¿é,Ñ­»·»òÕßIFÓï¾ä¶øÑÔ,ÏëÒª´ÓÍâ²ãÌøµ½ÄÚ²ãÊÇ·Ç·¨µÄ.
b.ʹÓÃGOTO×Ó¾ä´ÓÒ»¸öIF×Ó¾äÌøµ½ÁíÒ»¸ö×Ó¾äÖÐÒ²ÊÇ·Ç·¨µÄ.
begin
......

sqlÀàÐÍת»»

±êÌâ¡¡: sql ×Ö·û´¦Àíº¯Êý´óÈ«
¹Ø¼ü×Ö:
·ÖÀà¡¡: ¸öÈËרÇø
Ãܼ¶¡¡: ¹«¿ª
(ÆÀ·Ö: , »Ø¸´: 0, ÔĶÁ: 278) »»
SQL×Ö·û´®´¦Àíº¯Êý´óÈ«(ת)2008-04-01 17:21SQL×Ö·û´®´¦Àíº¯Êý´óÈ«(ת)select ×Ö¶Î1 from ±í1 where ×Ö¶Î1.IndexOf("ÔÆ")=1;
ÕâÌõÓï¾ä²»¶ÔµÄÔ­ÒòÊÇindexof£¨£©º¯Êý²»ÊÇsqlº¯Êý£¬¸Ä³És ......

¹ØÓÚsql serverµÄ1433ºÍ1434¶Ë¿Ú

ת×Ô£º°Ù¶È°Ù¿Æ
Ëùν¶Ë¿Ú£¬¾ÍÊÇÏ൱ÓÚ»úÆ÷ÓëÍâ½ç½Ó´¥µÄ´°¿Ú¡£¶Ë¿ÚÆäʵÊÇÈí¼þµÄ´°¿Ú£¬¾ÍÊÇ˵һ¸öÈí¼þÈç¹ûÒªºÍÍâ½çÁªÏµ£¬¾Í±ØÐë´ò¿ªÒ»¸ö¶Ë¿Ú£»1434¶Ë¿ÚÊÇ΢ÈíSQL Serverδ¹«¿ªµÄ¼àÌý¶Ë¿Ú¡£ÄãҪʹÓÃSQL£¬¾Í±ØÈ»´ò¿ª1433ºÍ1434¶Ë¿Ú¡£
ĬÈÏÇé¿öÏ£¬SQL ServerʹÓÃ1433¶Ë¿Ú¼àÌý£¬ºÜ¶àÈ˶¼ËµSQL ServerÅäÖõÄʱºòÒª°ÑÕâ¸ö¶Ë¿Ú¸Ä± ......

SQL ¶¯Ì¬ÅÅÐòµÄ·½·¨

ÔÚ¹«¹²ÐÂÎÅ×éÖУ¬Ò»¸ö¾­³£³öÏÖµÄÎÊÌâÊÇ“ÔõÑù²ÅÄܸù¾Ý´«µÝ¸ø´æ´¢¹ý³ÌµÄ²ÎÊý·µ»ØÒ»¸öÅÅÐòµÄÊä³ö£¿”¡£ÔÚһЩ¸ßˮƽר¼ÒµÄ°ïÖú֮ϣ¬ÎÒÕûÀí³öÁËÕâ¸öÎÊÌâµÄ¼¸ÖÖ½â¾ö·½°¸¡£
Ò»¡¢ÓÃIF...ELSEÖ´ÐÐÔ¤ÏȱàдºÃµÄ²éѯ
¡¡¡¡¶ÔÓÚ´ó¶àÊýÈËÀ´Ëµ£¬Ê×ÏÈÏëµ½µÄ×ö·¨Ò²ÐíÊÇ£ºÍ¨¹ýIF...ELSEÓï¾ä£¬Ö´Ðм¸¸öÔ¤ÏȱàдºÃµÄ²éѯÖеÄÒ» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ