What are the problems related to setTimestamp in Oracle JDBC?

Source: Internet
Author: User

The following articles mainly introduce the performance problems related to the setTimestamp of Oracle JDBC. I saw the performance problems related to the setTimestamp of Oracle JDBC on the relevant website two days ago, let's share it with you.

A technical problem occurred three years ago. At that time, it was in a hurry. Currently, Metalink has taken this issue as a Bug.

Problem description: An exception occurred while querying applications in Java through JDBC. The table field uses the DATE type. For queries within a very small RANGE of the time zone of the field (expected to be based on index range scan), the INDEX is specified on the SQL Map and is invalid. Still full table scan.

Culprit: setTimestamp () binds the value to the TIMESTAMP type, so that when compared with the DATA type, CBO will select full table scan.

Trace can be used to observe the abnormal behavior. TIMESTAMP is available on Oracle JDBC 9.2.0.1, and there are similar problems in several successive versions.

Solution: Use setString () instead of setTimestamp.

This story tells us that Oracle JDBC has many problems. Similarly, there are many potential problems with TIMESTAMP.


The above content is an introduction to the performance of Oracle JDBC's setTimestamp.

Article by: http://www.programbbs.com/doc/3296.htm

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.