Time of Update: 2015-09-08
標籤:今天碰到一個很奇怪的問題,直接在eclipse中將sql拷出,然後直接粘貼複製在資料庫中就會執行的非常慢,但是在利用plsql對sql語句進行格式整理之後,執行的速度就非常的快,之後我where條件中的時間判斷的‘=’兩端都加了空格,sql執行就變快了,之後我在程式中做了對應的修改,執行時間也同樣變快了,很神奇,這樣看來,盡量把格式寫標準還是有用的,原因的話,我會繼續去調查!Oracle執行時間與sql格式
Time of Update: 2015-09-08
標籤:1、製造資料時出現錯誤 ORA-30009問題 計劃任務:insert into test select rownum,sysdate from dualconnect by rownum<100000會出現ORA-30009 connect-by出錯 修改任務:insert into test select rownum,sysdate from xmltable(‘1 to 100000‘)使用xmltable來進行累計 2、TNS:NO
Time of Update: 2015-09-07
標籤:截取部分日誌資訊:2015-09-01 14:48:47,132 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]2015-09-01 14:48:47,178 INFO
Time of Update: 2015-09-07
標籤:來自: http://woainichenxueming.iteye.com/blog/726541 一. 最佳化oracle中的sql語句,提高運行效率1. 選擇最有效率的表名順序(只在基於規則的最佳化器中有效) ORACLE的解析器按照從右至左的順序處理FROM子句中的表名, FROM子句中寫在最後的表(基礎資料表 driving table)將被最先處理,
Time of Update: 2015-09-07
標籤:SELECT UPPER(F.TABLESPACE_NAME) "資料表空間名", D.TOT_GROOTTE_MB "資料表空間大小(M)", D.TOT_GROOTTE_MB - F.TOTAL_BYTES "已使用空間(M)", TO_CHAR(ROUND((D.TOT_GROOTTE_MB - F.TOTAL_BYTES) / D.TOT_GROOTTE_MB * 100,2),‘990.99‘) || ‘%‘ "使用比", F.TOTAL_BYTES "空閑空間(M)",
Time of Update: 2015-09-06
標籤:你可以包括實際的字元“%”或“_”模式中利用例外條款,其中確定的逸出字元。如果逸出字元出現在模式在字元“%”或“_“Oracle將解釋這個字元上的模式,而不是作為一種特殊的模式比對字元。搜尋的模式a_b在他們名字的員工: SELECT last_name FROM employees WHERE last_name LIKE ‘%A\_B%‘ ESCAPE
Time of Update: 2015-09-06
標籤:1 string sql = "insert into personinfo " +2 "(id,employeename,employeecode, " +3 "values(:id,:employeename,:employeecode, " )";4 OracleParameter[] pars = { new OracleParameter("id",t.Id),5 new
Time of Update: 2015-09-07
標籤:create table tb ([id] int,[name] varchar(2))insert into tbselect 1,‘aa‘ union allselect 2,‘bb‘ union allselect 1,‘cc‘ union allselect 3,‘dd‘ union allselect 2,‘ee‘ select * from tb--查詢select id, name=stuff((select ‘,‘+name from tb where
Time of Update: 2015-09-07
標籤: 環境: win7 64位, wampServer2.2, php5.5.20, oracle 11gR2 材料: ci.dll、oraociei11.dll、orannzsbb11.dll 都是從oralce client11gR2_x64中copy回來的。直接放到wamp->apapched->bin下; 然後wamp->php->php extensions,勾選php_oci8_11g;
Time of Update: 2015-09-07
標籤:轉自:http://blog.itpub.net/25322446/viewspace-767505說明:筆記總結了在工作中遇到過的幾種update方法和各種方法適用的範圍。1.單表更新方案:使用標準update文法即可,執行穩定且效率較高update tableset
Time of Update: 2015-09-07
標籤:Oracle資料庫中,有兩種類型的分區索引,全域索引和本地索引,其中本地索引又可以分為本地首碼索引和本地非首碼索引。下面就分別看看每種類型的索引各自的特點。全域索引以整個表的資料為對象建立索引,索引分割區中的索引條目既可能是基於相同的索引值但是來自不同的分區,也可能是多個不同索引值的組合。全域索引既允許索引分割區的索引值和表分區索引值相同,也可以不相同。全域索引和表之間沒有直接的聯絡,這一點和本地索引不同。SQL> create table orders ( &
Time of Update: 2015-09-07
標籤:在分析SQL效能的時候,經常需要確定資源消耗多的SQL,總結如下: 1 查看值得懷疑的SQLselect substr(to_char(s.pct, ‘99.00‘), 2) || ‘%‘ load, s.executions executes,
Time of Update: 2015-09-05
標籤:首先先安裝HA-Instant Client-v11.2.0.3.0-x86.rar:ftp://hhdown:[email protected]/download/HA-Instant%20Client-v11.2.0.3.0-x86.rarftp://hhdown:[email protected]/download/HA-Instant%20Client-v11.2.0.3.0-x64.rar 然後執行安裝ODBC一項一定要選擇安裝添加環境變數:
Time of Update: 2015-09-08
標籤:Numberic 資料類型用來儲存負的和正的整數、分數和浮點型資料,範圍在-1*10-103 和9.999…99*10125之間,有38位的精確度。標識一個資料超出這個範圍時就會出錯。Number( p,s) Number資料類型儲存一個有p位精確度的s位等級的資料numeric是number子類型,number可以存放1E-130~10E125數字,numeric最大精度為38位 來自為知筆記(Wiz)oracle表值numeric與nu
Time of Update: 2015-09-08
標籤:1、這是在oracle的sql視窗下執行一個代碼塊 declarev_char1 varchar2(100);v_char2 varchar2(100);v_c char(1); --中間變數beginv_char1 :=‘&no‘; --替換變換dbms_output.put_line(‘輸入的資料為:‘||v_char1);for i in reverse 1..length(v_char1)loopv_c :=
Time of Update: 2015-09-06
標籤:需求是要比較最近兩個月的值,進行資料檢驗!所以我用自關聯,來將兩個月的資料放到一行上,然後進行比較! sql語句類似於:
Time of Update: 2015-09-08
標籤:資料庫服務 database service oracle 伺服器 oracle中:1、查詢資料庫名:select name,dbid from v$database;或者show parameter db_name;2、查詢執行個體名:select instance_name from
Time of Update: 2015-09-05
標籤:驅動下載http://www.oracle.com/technetwork/topics/winsoft-085727.htmlhttp://www.oracle.com/technetwork/cn/topics/winsoft-095945-zhs.html oracle odbc 驅動安裝(不安裝oracle用戶端)最近做了一個項目,通過VC odbc訪問oracle資料庫,在我電腦上可以正常運行,在其他電腦上運行不了,原因是沒有oracle
Time of Update: 2015-09-05
標籤:一、字元類型 (1)固定長度的字串 CHAR(位元組長度是1~2000之間) CHAR(8)可以儲存4個雙位元組的字元,8個單位元組的字元,不足8位元組剩餘的部分用空格佔據 (2)可變長度字串 VARCHAR2(位元組長度是1~4000之間) VARCHAR2(8)
Time of Update: 2015-09-06
標籤:資料庫有如下表結構:user_info ( user_id NUMBER primary key, user_name VARCHAR2(200) NOT NULL,