- 2
- 0
- 约8.62千字
- 约 11页
- 2017-10-05 发布于河南
- 举报
创建索引对sql语句执行的影响(The impact of creating indexes on the execution of SQL statements)
创建索引对sql语句执行的影响(The impact of creating indexes on the execution of SQL statements)
The impact of [Oracle] creation indexes on the execution of SQL statements (1)
First, the impact of index creation on execution plans
Before SQL starts executing, Oracle will determine the execution plan of the SQL statement and access the corresponding tables and indexes as scheduled.
Once the execution plan is determined, Oracle will complete the execution of the SQL statement in accordance with the execution plan, and the index created after the execution of the SQL statement will not change the execution plan of the SQL statement.
Therefore, creating an index does not have any impact on the execution plan, nor does it affect the running SQL statement. Here is an example of a simple proof:
SQL, CREATE, TABLE, TEST (ID, NUMBER, FID, NUMBER, NAME, VARCHAR2 (30), BID_COLUMNS, CHAR (2000));
Table created.
SQL, INSERT, INTO, TEST, VALUES (1, 0,OBJECT,0);
1 row created.
SQL, INSERT, INTO, TEST, VALUES (2, 1,TABLE,0);
1 row created.
SQL, INSERT, INTO, TEST, VALUES (3, 1,INDEX,0);
1 row created.
SQL, INSERT, INTO, TEST, VALUES (4, 1,VIEW,0);
1 row created.
SQL, INSERT, INTO, TEST, VALUES (5, 1,SYNONYM,0);
1 row created.
SQL, INSERT, INTO, TEST, VALUES (6, 1,SOURCE,0);
1 row created.
SQL, INSERT, INTO, TEST, SELECT, 20000+ROWNUM, 2, TABLE_NAME,0, FROM, DBA_TABLES;
874 rows created.
SQL, INSERT, INTO, TEST, SELECT, 30000+ROWNUM, 3, INDEX_NAME,0, FROM, DBA_INDEXES;
1074 rows created.
SQL, INSERT, INTO, TEST, SELECT, 40000+ROWNUM, 4, VIEW_NAME,0, FROM, DBA_VIEWS;
2929 rows created.
SQL, INSERT, INTO, TEST, SELECT, 50000+ROWNUM, 5, TABLE_NAME,0, FROM, DBA_SYNONYMS;
2437 rows created.
SQL, INSERT, INTO, TEST, SELECT, 60000+ROWNUM, 6, NAME,0, FROM, DBA_SOURCE;
99717 rows created.
SQL COMMIT;
Commit complete.
SQL set timing on
SQL, SELECT, COUNT (*) FROM, TEST
2, START, WITH, ID = 1
3, CONNECT, BY, PRIOR, ID = FID;
COUNT (*)
Dear sirsre
One hundred and seven thousand and thirty-seven
Elapsed: 00:0
您可能关注的文档
- 企业如何通过慈善活动提高声誉(How can companies improve their reputation through philanthropy).doc
- 企业如何制作宣传册(How do you make brochures).doc
- 企业如何面对专家型消费(How do enterprises face expert consumption).doc
- 企业安全性评价工(Enterprise safety evaluation worker).doc
- 企业实施自我培训的6种方法(6 methods for enterprises to implement self training).doc
- 企业家精神如何向企业文化的扩展(How can entrepreneurship be extended to corporate culture).doc
- 企业年会,是指每一年春节后期,企业将举办的辞旧迎新庆贺勾当,...(Annual meeting of enterprises refers to the celebration of the New Year celebration and the celebration of the late spring festival,...).doc
- 企业并购中会计处理方法选择的纳税筹划新探(A new approach to tax planning in the selection of accounting treatment methods in mergers and acquisitions).doc
- 企业动态战略管理研究(Research on dynamic strategic management of enterprise).doc
- 企业并购后人力资源与文化的整合再造(Integration and reconstruction of human resources and culture after mergers and acquisitions).doc
- 伟明环保-市场前景及投资研究报告-境内业务稳健运行,印尼市场贡献边际增量.pdf
- 桂东县法院系统招聘考试真题2025.pdf
- 贵州省黔南布依族2026年中考三模物理试题及答案.pdf
- 贵州省黔南州2026年中考语文二模试卷附答案.pdf
- 贵州省铜仁市2026年中考语文二模试卷附答案.pdf
- 2026上半年安徽事业单位联考合肥市庐江县招聘36人备考题库及一套完整答案详解.docx
- 贵州省毕节市2026年中考语文一模试卷附答案.pdf
- 贵州省贵阳市南明区2026年中考语文一模试卷附答案.pdf
- 2026上半年安徽事业单位联考合肥市庐江县招聘36人备考题库及一套参考答案详解.docx
- 贵州省贵阳市白云区2026年中考二模物理试题附答案.pdf
最近下载
- PPAP培训课件(详细).pdf VIP
- 2023山东传媒职业学院教师招聘考试笔试试题2.pdf VIP
- 2025年数据中心五年建设:AI算力与投资方向报告.docx
- WebGIS原理及开发—基于开源框架的WebGIS技术493.pptx VIP
- 鹤煤三矿关于成立原煤车间智能选矸系统升级改造项目领导小组的通知.doc VIP
- 2023年山东传媒职业学院教师招聘考试笔试试题及答案解析.docx VIP
- 北师大版6六年级数学上册全套计算题专项练习16页.pdf VIP
- 2025中考语文名著阅读专题06 《昆虫记》真题练习(单一题)(学生版+解析版).docx
- Q_26 4003HJTG001-2019无心车床技术条件.pdf
- LC-2030C型高效液相色谱仪(设备编号)再确认方案 .pdf VIP
原创力文档

文档评论(0)