Oracle index creation

Source: Internet
Author: User
Create an index for an ORACLE data table
In general, if the data volume of a data table exceeds several hundred entries, you should consider creating an index. After so long, we finally created an index for some of our larger data tables.

First, check the existing indexes.
Select index_name from all_indexes where table_name = 'picture ';
Sure enough, the system only built the index for the primary key: sys_c55001
An error is also made. In general, Oracle is case-insensitive, but table_name in the preceding query statement must be in uppercase. If it is written as 'picture ', there is no record.

Then, create an index.
Create index picture_album_idx on picture (aid );
Create index picture_user_idx on picture (userid );
Create index picture_cat_idx on picture (CID );

Third, repeat the first step to verify whether the operation is successful.

Fourth, let's see if the speed is faster when you browse the album.
In theory, it should be faster.
-----------------------
Eg:
Select index_name from all_indexes where table_name = 'tb _ put_approve ';

Select * From tb_put_approve t

Create index tb_put_approve_approveid on tb_put_approve (approveid)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.