SQLÓï¾äÖ´ÐÐЧÂʼ°ÐÔÄܲâÊÔ
д³ÌÐòµÄÈË£¬ÍùÍùÐèÒª·ÖÎöËùдµÄSQLÓï¾äÊÇ·ñÒѾÓÅ»¯¹ýÁË£¬·þÎñÆ÷µÄÏìӦʱ¼äÓжà¿ì£¬Õâ¸öʱºò¾ÍÐèÒªÓõ½SQLµÄSTATISTICS״ֵ̬À´²é¿´ÁË¡£
ͨ¹ýÉèÖÃSTATISTICSÎÒÃÇ¿ÉÒԲ鿴ִÐÐSQLʱµÄϵͳÇé¿ö¡£Ñ¡ÏîÓÐPROFILE£¬IO £¬TIME¡£½éÉÜÈçÏ£º
SET STATISTICS PROFILE ON£ºÏÔʾ·ÖÎö¡¢±àÒëºÍÖ´ÐвéѯËùÐèµÄʱ¼ä£¨ÒÔºÁÃëΪµ¥Î»£©¡£
SET STATISTICS IO ON£º±¨¸æÓëÓï¾äÄÚÒýÓõÄÿ¸ö±íµÄɨÃèÊý¡¢Âß¼¶ÁÈ¡Êý£¨ÔÚ¸ßËÙ»º´æÖзÃÎʵÄÒ³Êý£©ºÍÎïÀí¶ÁÈ¡Êý£¨·ÃÎÊ´ÅÅ̵ĴÎÊý£©ÓйصÄÐÅÏ¢¡£
SET STATISTICS TIME ON£ºÏÔʾÿ¸ö²éѯִÐкóµÄ½á¹û¼¯£¬´ú±í²éѯִÐеÄÅäÖÃÎļþ¡£
ʹÓ÷½·¨£º´ò¿ªSQL SERVER ²éѯ·ÖÎöÆ÷£¬ÊäÈëÒÔÏÂÓï¾ä£º
SET STATISTICS PROFILE ON
SET STATISTICS IO ON
SET STATISTICS TIME ON
GO /*--ÄãµÄSQL½Å±¾¿ªÊ¼*/
SELECT [TestCase] from [TestCaseSelect]
GO /*--ÄãµÄSQL½Å±¾½áÊø*/
SET STATISTICS PROFILE OFF
SET STATISTICS IO OFF
SET STATISTICS TIME OFF
ÁíÍ⣬Ҳ¿ÉÒÔͨ¹ýÊÖ¹¤Ìí¼ÓÓï¾ä£¬¼ÆËãÖ´ÐÐʱ¼äÀ´²é¿´Ö´ÐÐÓï¾ä»¨·ÑÁ˵Äʱ¼ä£¬ÒÔÅжϸÃÌõSQLÓï¾äµÄЧÂÊÈçºÎ£º
declare @d datetime
set @d=getdate()
/*ÄãµÄSQL½Å±¾¿ªÊ¼*/
SELECT [TestCase] from [TestCaseSelect]
/*ÄãµÄSQL½Å±¾½áÊø*/
select [Óï¾äÖ´Ðл¨·Ñʱ¼ä(ºÁÃë)]=datediff(ms,@d,getdate())
trackback: http://www.piaoyi.org/database/sql-statistics.html
Ïà¹ØÎĵµ£º
ºÍjava.lang.IllegalArgumentException: org.hibernate.QueryException: JPA-style positional param was not an integral ordinalÕ½¶·ÁË°ëÌ죬º¹°¡£¡
ʹÓÃjpa + strut+ hibernate ¾Í±¨org.hibernate.QueryException: JPA-style positional param was not an integral ordinal
Ò»°ã°ÑhqlÓï¾äдÔÚÒ»ÐУ¬»áºÜ³¤£¬ÔÚideÖÐÐèÒ ......
ÈçÒªÔÚÒ»¸öhwsp±íÖÐÌî¼Ó×ֶΣºylxs
alter table hwsp add column ylxs
ALTER TABLE ±í {ADD ADD{COLUMN ×Ö¶ÎÀàÐÍ [ (×Ö³¤)] [NOT NULL] [CONSTRAINT Ë÷Òý ] |
ALTER COLUMN ×Ö¶ÎÀàÐÍ [(×Ö³¤)] |
CONSTRAINT ¶àÖØ×Ö¶ÎË÷Òý } |
&nbs ......
¼ÆËã¼ä¸ôʱ¼ä£º
select f_date,f_cstime,f_cetime, (((SYSDATE- TO_DATE(f_date||f_cstime,'YYYYMMDDHH24MISS')) * 86400000)-((SYSDATE- TO_DATE(f_date||f_cetime,'YYYYMMDDHH24MISS')) * 86400000))/1000 CURRENT_MILLI from ycsq_t_hauthlog where f_cstime<>'999999'
½«×Ö·û´®×ª»»³ÉÈÕÆÚÀà:SYSDATE- TO_ ......
ÈçºÎÓÃÃüÁîÉú³ÉSQL SERVER½Å±¾
--ÒÔÏÂÉú³ÉÕû¸öÊý¾Ý¿âµÄSQL½Å±¾£¬ÎÒ²âÊÔÁË£¬Ï൱ºÃÓá£
--(scptxfr.exeµÄ·¾¶ÒªÕýÈ·ÒÔÏÂÊÇÎҵķ¾¶)
declare @cMd varchar(1000)
set @cmd = 'master.dbo.xp_cm ......
ϵͳ»·¾³£ºwindows xp pro
Êý¾Ý¿â£ºMS Sql 2000
IIS: 5.1 ASP.NET2.0
ÒòΪ´úÂëÊÇ2.0.netµÄ,ûÓа취ֻºÃ°²×°ÁË.netÏÂÔØÄã¿ÉÒÔȥ΢ÈíµÄÍøÕ¾ÉÏÈ¥ÏÂÔØ.Õâ¸öÊÇÃâ·ÑµÄÈí¼þ£¬ÎÒÖªµÀµÄÊÇÃâ·ÑµÄ¡£
Êý¾Ý¿â×öÁËѹËõºó׺ÊÇbakµÄ£¬ËùÒÔÊý¾Ý¿â²»ÄÜÖ±½ÓʹÓã¬ÐèÒªµ¼ÈëÔÚÍøÉϲéÁ˺ܶàµÄ×ÊÁϵ«ÊDz»¶à£¬µ«×Ô¼º³É¹¦µ¼ÈëÁË£¬Ð´ÏÂÀ´×öÒ»¸ö±¸ ......