OracleÖеÄcovering index
CSDNÀïµÄÒ»¸öÅóÓÑÎʵ½ÁËÕâ¸öË÷Òý¸²¸ÇµÄ¸ÅÄî¡£ Õâ¸ö¸ÅÄîºÜСµÄ֪ʶµã£¬ÔÚÎÒµÄÂÛ̳ÀïÓнâÊÍ“”£¬²»¹ý×÷ΪOracle°æÖ÷£¬²»ÄÜÔÚ»ØÌûÀï¼ÓÉÏÍøÍâµÄµØÖ·Á´½Ó£¬ËùÒÔÕâÀïÔÚCSDNÀïÌûÉÏÒ»·Ý
±ÈÈçÓи´ºÏË÷ÒýΪ3¸ö×ֶΣºf1 + f2 + f3,ÇëÎÊ:
1: select f1, f2, f3, f4 from table where f1 = 'XX' and f2 = 'XX'.
2: select f1, f2, f3 from table where f1 = 'XX' and f2 = 'XX'.
ÓÐÈË˵1·ûºÏË÷Òý¸²¸Ç, ÓÐÈË˵ֻÓÐ2²Å·ûºÏ, ÇëÎÊÄĸö¶Ô?
OracleÖеÄcovering index(Ó¦¸Ã·Òë³É¸²¸ÇË÷Òý)ÊÇÖ¸
http://www.inthirties.com/thread-458-2-1.html
# A covering index is an index, which includes all of the columns referenced in the query. So the creating covering index can improve performance because all the data for the query is contained within the index itself and only the index pages, not the data pages, will be used to retrieve the data. Covering indexes can bring a lot of performance to a query, because it can save a huge amount of I/O operations.
´ÓÕâ¸ö¶¨ÒåÉϽ²£¬2·ûºÏ£¬1²»·ûºÏ¡£
Ïà¹ØÎĵµ£º
Ò»¡¢ ³£ÓÃÈÕÆÚÊý¾Ý¸ñʽ
1.Y»òYY»òYYY ÄêµÄ×îºóһ룬Á½Î»»òÈýλ
SQL> Select to_char(sysdate,'Y') from dual;
TO_CHAR(SYSDATE,'Y')
--------------------
7
SQL> Select to_char(sysdate,'YY') from dual;
TO_CHAR(SYSDATE,'YY')
---------------------
07
SQL> Select to_char(sysdate,'YYY') from ......
ORACLE sql µÄ´¦Àí¹ý³Ì´óÖÂÈçÏ£º
1.ÔËÓÃHASHËã·¨£¬µÃµ½Ò»¸öHASHÖµ£¬Õâ¸öÖµ¿ÉÒÔͨ¹ýV$SQLAREA.HASH_VALUE ²é¿´
2.µ½shared pool ÖÐµÄ library cache ÖвéÕÒÊÇ·ñÓÐÏàͬµÄHASHÖµ£¬Èç¹û´æÔÚ£¬ÔòÎÞÐèÓ²½âÎö£¬½øÐÐÈí½âÎö
3.Èç¹ûshared pool²»´æÔÚ´ËHASHÖµ£¬Ôò½øÐÐÓï·¨¼ì²é£¬²é¿´ÊÇ·ñÓÐÓï·¨´íÎó
&nbs ......
Ç°¶Îʱ¼ä×öÁËÒ»¸öÐéÄâ×éÖ¯µÄ´´½¨¡£Õâ¸öÐéÄâ×éÖ¯µÄ´´½¨ÊÇ´ÓÏÖÓеÄ×éÖ¯ÖжÁÈ¡Êý¾ÝÈ»ºó½øÐзÖÎö±£´æµ½ÐéÄâ×éÖ¯±íÖС£±£´æÖ®ºóдÈÕÖ¾·½±ãͬ²½µ½ÆäËüϵͳÖС£¹«Ë¾Ê¹ÓõÄÖ÷Òª¼¼ÊõÊÇSSH¡£ÓÉÓÚÊÇÐÂÈËûÓÐʲô¾Ñ飬¼Ó֮ʱ¼ä±È½Ï½ôÆÈ£¬×îºóʹÓÃÒ»°ãµÄÂ߼˼Ïëͨ¹ýµÝ¹éÔÚhibernateÏÂ˳Àû´´½¨ÁË¡£¿ÉÊÇ´ÓÏÖÓеÄ×éÖ¯Ö ......
begin
sys.dbms_job.submit(job => :job,
what => 'p_apip_price_send;',
&nbs ......
TO_DATE¸ñʽ(ÒÔʱ¼ä:2007-11-02 13:45:25ΪÀý)
Year:
yy two digits Á½Î»Äê ......