Oracle Tips:

Source: Internet
Author: User
Tags create index one table

The Oracle Digital dictionary contains a little-known v$session_longops view. The V$session_longops view enables Oracle experts to reduce the elapsed time of a long-running DDL and DML statement.


For example, in a data warehouse environment, even with parallel index creation techniques, it takes many hours to build a large number of G-byte indexes. Here you can query the V$session_longops view to quickly find out how much of a particular DDL statement has been completed. In fact, the V$session_longops view can also be used for any long-running operation, including an update operation that is running for a long time.

The following script displays a status message describing the time that a long-running DDL operation has been used. Note that you must obtain the SID from the v$session and insert it into the following SQL statement:

Select
Sid
Message
From
V$session_longops
where
SID = 13
ORDER BY
Start_time;
Here is an example of an output that shows the running process of the CREATE INDEX statement that is running for a long time.


SID message
--- -------------------------------------------------------------------
One Table scan:cust. pk_idx:732 out of the 243260 Blocks done



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.