In which environment will the number of Oracle query records be faulty?

Source: Internet
Author: User

The following articles mainly list two different environments and explain the strange problems in the number of Oracle query records. How to solve these problems remains to be studied, I believe that if you understand these two problems, you will be able to perform better operations on them without being confused.

First, let's look at a piece of code:

 
 
  1. dbo.getPreparedStatement(”select * from 
    (select * from Entity_HotLink where hotLinkSortId = ? 
    and hotLinkStatus = ? order by hotLinkOrder ASC, 
    lastModifiedDate DESC) where ROWNUM <= ?");  
  2. dbo.pstmt.setInt(1, hotLinkSortId);  
  3. dbo.pstmt.setInt(2, hotLinkStatus);  
  4. dbo.pstmt.setInt(3, count); 

Environment 1: windows + oracle 10g normal

A strange problem occurs in the number of Oracle query records. Environment 2: Redhat E5.2 64bit + oracle 10g (RAC cluster) query execution, but only 10 records are returned, no matter how large your count is.

Change

 
 
  1. dbo.getPreparedStatement(”select * from 
    (select * from Entity_HotLink where hotLinkSortId = ? 
    and hotLinkStatus = ? order by hotLinkOrder ASC, 
    lastModifiedDate DESC) where ROWNUM <= " + count);  
  2. dbo.pstmt.setInt(1, hotLinkSortId);  
  3. dbo.pstmt.setInt(2, hotLinkStatus); 

You can query records normally.

This is a strange problem. Study it again. The above content is a description of the strange problem that occurs in the number of Oracle query records. I hope it will help you in this regard.

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.