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

ORACLE SQL ÓÅ»¯µÄÈô¸É·½·¨

Ò»¡¢ ÏȽéÉÜÒ»ÏÂoracleµÄSGA£ºÊý¾Ý¿âµÄϵͳȫ¾ÖÇø£¬SGAÖ÷ÒªÓÉÈý²¿·Ö¹¹³É£º¹²Ïí³Ø¡¢Êý¾Ý»º³åÇø¡¢ÈÕÖ¾»º³åÇø¡£ 1¡¢¹²Ïí³ØÓÖÓÉÁ½²¿·Ö¹¹³É£º¹²ÏíSQLÇøºÍÊý¾Ý×ֵ仺³åÇø¡£¹²ÏíSQLÇøרÃÅ´æ·ÅÓû§SQLÃüÁoracleʹÓÃ×î½ü×îÉÙʹÓõÈÓÅÏȼ¶Ëã·¨À´¸üи²¸Ç£»Êý¾Ý×ֵ仺³åÇø£¨library cache£©´æ·ÅÊý¾Ý¿âÔËÐеĶ¯Ì¬ÐÅÏ¢¡£Êý¾Ý¿âÔËÐÐÒ»¶Îʱ¼äºó£¬DBAÐèÒª²é¿´ÕâЩÄÚ´æÇøÓòµÄÃüÖÐÂÊÒÔ´ÓÊý¾Ý¿â½Ç¶È¶ÔÊý¾Ý¿âÐÔÄܵ÷ÓÅ¡£Í¨¹ýÖ´ÐÐÏÂÊöÓï¾ä²é¿´£º
select (sum(pins - reloads)) / sum(pins) "Lib Cache" from v$librarycache;
--²é¿´¹²ÏíSQLÇøµÄÖØÓÃÂÊ£¬×îºÃÔÚ90£¥ÒÔÉÏ£¬·ñÔòÐèÒªÔö¼Ó¹²Ïí³ØµÄ´óС¡£
select (sum(gets - getmisses - usage - fixED)) / sum(gets) "Row Cache" from v$rowcache;
--²é¿´Êý¾Ý×ֵ仺³åÇøµÄÃüÖÐÂÊ£¬×îºÃÔÚ90£¥ÒÔÉÏ£¬·ñÔòÐèÒªÔö¼Ó¹²Ïí³ØµÄ´óС¡£
2¡¢ Êý¾Ý»º³åÇø£º´æ·ÅsqlÔËÐнá¹ûץȡµ½µÄdata block£»
SELECT name, value  from v$sysstat  WHERE name IN ('db block gets', 'consistent gets','physical reads');
-- ²é¿´Êý¾Ý¿âÊý¾Ý»º³åÇøµÄʹÓÃÇé¿ö¡£²éѯ³öÀ´µÄ½á¹û¿ÉÒÔ¼ÆËã³öÀ´Êý¾Ý»º³åÇøµÄʹÓÃÃüÖÐÂÊ£½1 - ( physical reads / (db block gets + consistent gets) )¡£ÃüÖÐÂÊÓ¦¸ÃÔÚ90£¥ÒÔÉÏ£¬·ñÔòÐèÒªÔö¼ÓÊý¾Ý»º³åÇøµÄ´óС¡£
3¡¢ ÈÕÖ¾»º³åÇø£º´æ·ÅÊý¾Ý¿âÔËÐÐÉú³ÉµÄÈÕÖ¾¡£
select name,value from v$sysstat where name in ('redo entries','redo log space requests');
--²é¿´ÈÕÖ¾»º³åÇøµÄʹÓÃÇé¿ö¡£²éѯ³öµÄ½á¹û¿ÉÒÔ¼ÆËã³öÈÕÖ¾»º³åÇøµÄÉêÇëʧ°ÜÂÊ£ºÉêÇëʧ°ÜÂÊ£½requests/entries£¬ÉêÇëʧ°ÜÂÊÓ¦¸Ã½Ó½üÓÚ0£¬·ñÔò˵Ã÷ÈÕÖ¾»º³åÇø¿ªÉè̫С£¬ÐèÒªÔö¼ÓORACLEÊý¾Ý¿âµÄÈÕÖ¾»º³åÇø¡£
¶þ£®SqlÓï¾äµÄÖ´Ðв½Ö裺
Á˽âsqlµÄÖ´Ðв½ÖèÓÐÀûÓÚ¸üºÃµÄÓÅ»¯ËüÃÇ£¬Ã¿ÌõsqlÓï¾äÖ´ÐÐʱ¶¼Òª¾­ÀúÒÔϼ¸²½£º
1. Create cursor £»
2. Parse, if it is not already in the shared pool.£»
3. Any query in the statement is processed.
4. Bind Variables
5. Execute.
6. If possible, the statement is parallelized.
7. Rows to be returned are fetched. ÆäÖУ¬Parse—ÊÇ×îÓÐÓÅ»¯Ç±Á¦µÄ½×¶Î¡£
Cursor´´½¨ºó£¬oracle½«ÔÚshare poolÖÐÑ°ÕÒÊÇ·ñ¸ÃsqlÓï¾äÒѾ­´æÔÚ£¬ÈôÒѾ­´æÔÚÇÒÒѾ­±»parsed£¬Ôò²»ÐèÒªÔÙÖ´ÐÐparse£¬Ö±½Óµ½ÏÂÒ»²½¡£ÈôδÔÚshare poolÖÐÕ


Ïà¹ØÎĵµ£º

SQLÀïµÄÖ÷¼üºÍÍâ¼ü

Õâ¸öÂß¼­¹Øϵէ¿´ÆðÀ´±È½Ï¸´ÔÓ£¬ÅªÇå³þÁ˾ͺã¡
ÓÐÁ½¸ö±í£¬
student(
id,
name,
primary key (id)
);
studentInfo(
id,
age,
address,
foreign key(id) references outTable(id) on delete cascade on update cascade
);
µ±ÎÒÃÇɾ³ýstudent±íµÄʱºò×ÔȻϣÍûstudentInfoÀïµÄÏà¹ØÐÅÏ¢Ò²±»É¾³ý£¬Õâ¾ÍÊÇÍâ¼üÆð×÷Óà ......

sql serverÖг£¼ûµÄº¯ÊýµÄÓ÷¨

SQL×Ö·û´®º¯Êýhttp://www.cnblogs.com/virusswb/archive/2008/09/10/1288576.html
selectÓï¾äÖÐÖ»ÄÜʹÓÃsqlº¯Êý¶Ô×ֶνøÐвÙ×÷£¨Á´½Ósql server£©£¬
select ×Ö¶Î1 from ±í1 where ×Ö¶Î1.IndexOf("ÔÆ")=1;
ÕâÌõÓï¾ä²»¶ÔµÄÔ­ÒòÊÇindexof£¨£©º¯Êý²»ÊÇsqlº¯Êý£¬¸Ä³Ésql¶ÔÓ¦µÄº¯Êý¾Í¿ÉÒÔÁË¡£
left£¨£©ÊÇsqlº¯Êý¡£
select ×Ö ......

DBF±íÓëSQL Server±íµÄµ¼Èë¡¢µ¼³ö

----------Dbf µ¼Èë Sql Server±í----------
ÒÔϾùÒÔSQL2000¡¢VFP6¼°ÒÔÉϵıíΪÀý
´úÂëµ¼È룺²éѯ·ÖÎöÆ÷ÖÐÖ´ÐÐÈçÏÂÓï¾ä(ÏÈÑ¡Ôñ¶ÔÓ¦µÄÊý¾Ý¿â)
-------------Èç¹û½ÓÊܵ¼ÈëÊý¾ÝµÄSQL±íÒÑ´æÔÚ
--Èç¹û½ÓÊܵ¼ÈëÊý¾ÝµÄSQL±íÒѾ­´æÔÚ
Insert Into ÒѾ­´æÔÚµÄSQL±íÃû Select * from openrowset('MSDASQL','Driver=Microso ......

sqlÖ´ÐÐ˳Ðò

±ê×¼µÄ sql µÄ½âÎö˳ÐòΪ: (1).from ×Ӿ䠠×é×°À´×Ô²»Í¬Êý¾ÝÔ´µÄÊý¾Ý
 (2).where ×Ӿ䠠»ùÓÚÖ¸¶¨µÄÌõ¼þ¶Ô¼Ç¼½øÐÐɸѡ
 (3).group by ×Ӿ䠠½«Êý¾Ý»®·ÖΪ¶à¸ö·Ö×é 
 (4).ʹÓþۺϺ¯Êý½øÐмÆËã
 (5).ʹÓàhaving  ......

C#Á¬½ÓAccessºÍSQL ServerÊý¾Ý¿â

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Data.OleDb;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace Str
{
public partial class Form1 : F ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ