ͨ¹ýv$sqlarea,v$sql²éѯ×îÕ¼ÓÃ×ÊÔ´µÄ²éѯ
ͨ¹ýv$sqlarea,v$sql²éѯ×îÕ¼ÓÃ×ÊÔ´µÄ²éѯ ÊÕ²Ø
ÒýÓÃ:http://blog.chinaunix.net/u/3866/showart_396335.html
-----------------------
v$sqlarea,v$sql
-----------------------
´ÓV$SQLAREAÖвéѯ×îÕ¼ÓÃ×ÊÔ´µÄ²éѯ
select b.username username,a.disk_reads reads,
a.executions exec,a.disk_reads/decode(a.executions,0,1,a.executions) rds_exec_ratio,
a.sql_text Statement
from v$sqlarea a,dba_users b
where a.parsing_user_id=b.user_id
and a.disk_reads > 100000
order by a.disk_reads desc;
ÓÃbuffer_getsÁÐÀ´Ìæ»»disk_readsÁпÉÒԵõ½Õ¼ÓÃ×î¶àÄÚ´æµÄsqlÓï¾äµÄÏà¹ØÐÅÏ¢¡£
V$SQLÊÇÄÚ´æ¹²ÏíSQLÇøÓòÖÐÒѾ½âÎöµÄSQLÓï¾ä¡£
ÁгöʹÓÃƵÂÊ×î¸ßµÄ5¸ö²éѯ£º
select sql_text,executions
from (select sql_text,executions,
rank() over
(order by executions desc) exec_rank
from v$sql)
where exec_rank <=5;
ÏûºÄ´ÅÅ̶ÁÈ¡×î¶àµÄsql top5£º
select disk_reads,sql_text
from (select sql_text,disk_reads,
dense_rank() over
(order by disk_reads desc) disk_reads_rank
from v$sql)
where disk_reads_rank <=5;
ÕÒ³öÐèÒª´óÁ¿»º³å¶ÁÈ¡£¨Âß¼¶Á£©²Ù×÷µÄ²éѯ£º
select buffer_gets,sql_text
from (select sql_text,buffer_gets,
dense_rank() over
(order by buffer_gets desc) buffer_gets_rank
from v$sql)
where buffer_gets_rank<=5;
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/kingmaxno1/archive/2009/01/13/3766368.aspx
Ïà¹ØÎĵµ£º
Ç°Á½ÌìÒ»¸öѧ½ãÎÊÎÒ¸öSQLÓï¾äµÄÎÊÌ⣬ÏÖÔڰѽâ¾ö·½°¸Ìù³öÀ´£¬Ò²Ëã×ܽáһϰɡ£
ËýµÄÎÊÌâÊÇ£º“Ò»¸ö±íÖÐÓÐ15¸ö×ֶΣ¬ÓÃSQLÓï¾äÅжÏÆäÖÐ5Ïî»òÒÔÉϲ»Îª¿Õ£¬ÔõôÅжϣ¬ºÜ¼±……”¡£
µ±Ê±ÎÒºÜ棬û¶à¿´£¬ºÇºÇ£¬²»¹»Òâ˼À²¡£µ«ÎÒÇëͬÊ°ïËýдÁ˸ö£¬ÒÔ½âȼü֮¼±£¬ÔÚ´ËҲллСÃס£
½ñÌìÔÙ°ÑQQÁÄÌì¼Ç¼· ......
1.sp_helpsort
SELECT SERVERPROPERTY ('Collation')
²é¿´ÄãµÄÅÅÐò¹æÔò.
²»¹ýÄãµÄÕâ¸öÓ¦¸ÃºÍ×Ö·û¼¯ÓйØ.
2.¸ü¸Ä·þÎñÆ÷ÅÅÐò¹æÔò
¸ü¸Ä SQL Server 2005 ʵÀýµÄĬÈÏÅÅÐò¹æÔòµÄ²Ù×÷¿ÉÄÜ»á±È½Ï¸´ÔÓ£¬°üÀ¨ÒÔϲ½Ö裺
È·±£¾ßÓÐÖØд´½¨Óû§Êý¾Ý¿â¼°ÕâЩÊý¾Ý¿âÖеÄËùÓжÔÏóËùÐèµÄÈ«²¿ÐÅÏ¢»ò½Å±¾¡£
ʹÓù¤¾ß£¨ÀýÈç´óÈÝÁ ......
¹Ì¶¨³¤¶È(char)Óë¿É±ä³¤¶È(varchar)×Ö·ûÊý¾ÝÀàÐÍ
char[(n)]
³¤¶ÈΪn¸ö×ֽڵĹ̶¨³¤¶ÈÇÒ·ÇUnicodeµÄ×Ö·ûÊý¾Ý¡£n±ØÐëÊÇÒ»¸ö½éÓÚ1ºÍ8,000Ö®¼äµÄÊýÖµ¡£´æ´¢´óСΪn¸ö×Ö½Ú¡£charÔÚSQL-92ÖеÄͬÒå´ÊΪcharacter¡£
varchar[(n)]
³¤¶ÈΪn¸ö×ֽڵĿɱ䳤¶ÈÇÒ·ÇUnicodeµÄ×Ö·ûÊý¾Ý¡£n±ØÐëÊÇÒ»¸ö½éÓÚ1ºÍ8,000Ö®¼äµÄÊýÖµ¡£´æ´¢´óСΪ ......
¡¾ÒýÓãºÃÍáï¼¼ÊõÎÄÕÂÕªÒª
¡¿
¾²âÊÔ£¬·½·¨¶þ¿É³É¹¦É¾³ýÊý¾Ý£¬·½·¨Ò»¡¢Èý ɾ³ýÊý¾Ýʧ°Ü¡£Çë·¹ýµÄÅóÓÑ£¬Ö¸µãÃÔ½ò¡£¡£¡£
ÎÊÌ⣺һ¸ö±íÓÐ×ÔÔöµÄID
ÁУ¬±íÖÐÓÐһЩ¼Ç¼ÄÚÈÝÖظ´£¬Ò²¾ÍÊÇ˵ÕâЩ¼Ç¼³ýÁËID
²»Í¬Ö®Í⣬ÆäËûµÄÐÅÏ¢¶¼Ïàͬ¡£ÐèÒª°ÑÖظ´µÄ¼Ç¼±£ÁôÒ»Ìõ£¬Ê£ÏµÄɾ³ý
·½·¨Ò»£º»¹ÊÇ2000
ÄêµÄʱºòһλOracl ......
treeview.aspxÖдúÂëÈçÏ£º
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="treeview.aspx.cs" Inherits="treeview" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999 ......