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:
- dbo.getPreparedStatement(”select * from
(select * from Entity_HotLink where hotLinkSortId = ?
and hotLinkStatus = ? order by hotLinkOrder ASC,
lastModifiedDate DESC) where ROWNUM <= ?");
- dbo.pstmt.setInt(1, hotLinkSortId);
- dbo.pstmt.setInt(2, hotLinkStatus);
- 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
- dbo.getPreparedStatement(”select * from
(select * from Entity_HotLink where hotLinkSortId = ?
and hotLinkStatus = ? order by hotLinkOrder ASC,
lastModifiedDate DESC) where ROWNUM <= " + count);
- dbo.pstmt.setInt(1, hotLinkSortId);
- 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.