Strange invalid conditions caused by Indexes

Source: Internet
Author: User

Background: tracking when I got off work yesterdayProgram, Suddenly found a strange problem, the same data can be found using like, and the use of = can not be found. For example

Select * from EMP where empno = 123; no data is found, but the data is queried by name. The 123 data does exist. Change the query condition

Select * from EMP where empno like 123; after that, you can query the data, which was originally thought to be a data problem. After copying the data, you can find that the data is correct and there are no strange characters. It was strange to execute various operations on this record. When the empno field was last updated, it was suddenly found that the update was not going up. The database reported an error and the Object id xxx encountered an error. Finally, the problem is found. query user_object.object_id and find that the object is an index, which exactly contains the empno field. After the index is rebuilt, the problem disappears.

Problem analysis: the database is processing the EMP table because of a sudden power failure at noon, which may affect the index. This problem is exposed when indexes need to be maintained. Oracle does not report an error when indexes are used for normal queries.

Thank you for your key role in solving this problem.

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.