偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

Oracle數(shù)據(jù)獲取的實際方式演示

數(shù)據(jù)庫 Oracle
我們今天主要和大家描述的是Oracle數(shù)據(jù)獲取的實際方式的測試的實際操作步驟,以下就是文章的具體的相關內(nèi)容介紹。

以下的文章主要主要是對Oracle數(shù)據(jù)獲取的實際方式的測試,我們首先是通過建立典型的實驗環(huán)境,來對Oracle數(shù)據(jù)獲取的實際操作來進行詳細的說明,以下就是文章的具體內(nèi)容描述,望你瀏覽之后會有所收獲。

首先建立實驗環(huán)境 

  1. create table test as select * from dba_objects where 0=1;  
  2. create index ind_test_id on test(object_id);  
  3. insert into test select * from dba_objects  
  4. where object_id is not null and object_id>10000 order by object_id desc;  
  5. analyze table test compute statistics for table for all columns for all indexes;  
  6. Table Access Full  
  7. SQL> set autotrace trace;  
  8. SQL> select object_id from test;  
  9. set autotrace trace;  
  10. select object_id from test;  
  11. | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |  
  12. 1 | TABLE ACCESS FULL| TEST | 58650 | 229K | 239 (1)| 00:00:03 |  

 注意這是因為object_id列默認是可以為null的,如果修改成not null那么Oracle數(shù)據(jù)獲取方式會變成什么方式?

  1. Index Fast Full Scan  
  2. alter table test modify(object_id not null);  
  3. select object_id from test;  
  4. | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |  
  5. 1 | INDEX FAST FULL SCAN| IND_TEST_ID | 58650 | 229K| 66 (0)| 00:00:01 |  
  6. Index Full Scan  
  7. select/*+ index(test ind_TEST_ID)*/ object_id from test;  
  8. | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |  
  9. 1 | INDEX FULL SCAN| IND_TEST_ID | 58650 | 229K| 240 (1)| 00:00:03 |  
  10. Index Range Scan  
  11. select/*+ index(test ind_TEST_ID)*/ object_id from test where object_id < 68926;  
  12. | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |  
  13. 1 | INDEX RANGE SCAN| IND_TEST_ID | 57903 | 226K| 237 (1)| 00:00:03  
  14. SQL> select object_id from test where rownum<11INDEX FAST FULL SCAN  
  15. OBJECT_ID  
  16. 68917  
  17. 68918  
  18. 68919  
  19. 68920  
  20. 68921  
  21. 68922  
  22. 68923  
  23. 68924  
  24. 68925  
  25. 68926  

 已選擇10行。

  1. SQL> select/*+ index(test ind_TEST_ID)*/ object_id from test where rownum<11; INDEX FULL SCAN  
  2. OBJECT_ID  
  3. 10001  
  4. 10002  
  5. 10003  
  6. 10004  
  7. 10005  
  8. 10006  
  9. 10007  
  10. 10008  
  11. 10009  
  12. 10010  

 已選擇10行。 

  1. select * from test where rownum < 2;  
  2. ....... 69554 .......  

其他的不關注只關注OBJECT_ID列 。以上的相關內(nèi)容就是對@@@@@@@的介紹,望你能有所收獲。

 【編輯推薦】

  1. 實現(xiàn)Oracle傳輸表空間的功能“竅門”
  2. Oracle rownum的實際用法的匯總
  3. 對Oracle 10g中hints調(diào)整機制解析
  4. Oracle數(shù)據(jù)庫安全性中的問題有哪些?
  5. Oracle數(shù)據(jù)集成的解決方案詳解
責任編輯:佚名 來源: 互聯(lián)網(wǎng)
相關推薦

2010-04-19 09:26:04

Oracle數(shù)據(jù)庫

2010-04-09 13:35:35

Oracle啟動

2010-04-26 17:06:05

Oracle數(shù)據(jù)

2010-04-16 13:59:40

Oracle數(shù)據(jù)

2010-06-12 09:53:19

2010-06-07 16:22:55

MySQL數(shù)據(jù)庫

2010-04-28 15:04:37

Oracle數(shù)據(jù)

2010-04-14 09:33:58

Oracle Spat

2010-04-30 17:33:27

Oracle數(shù)據(jù)集成

2010-04-29 10:41:55

2010-03-30 16:33:55

Oracle數(shù)據(jù)類型

2010-04-26 09:41:48

Oracle sqlp

2010-05-10 10:19:28

Oracle實戰(zhàn)RMA

2010-04-01 13:09:12

Oracle中join

2010-04-20 08:53:42

Oracle左連接

2010-04-21 11:27:55

Oracle數(shù)據(jù)庫

2010-05-18 17:24:44

MySQL修改表字段

2010-05-31 14:59:36

PHP + MySQL

2010-04-08 18:33:46

Oracle VARR

2010-04-06 15:23:42

Oracle sql
點贊
收藏

51CTO技術棧公眾號