Difference in RowCount Vs EstimatedRowCount Vs FetchedRowCount in ADF

Being an ADF developer,there are few method which is very confusing .So lets discuss method which fetch row count of VO>
Sometimes in ADF applications, we need to count the number of rows, as shown in the table .If we don’t understand these method , it will create a big performance problem.

getRowCount() -> getRowCount() retrives all the records from View Object by executing ViewObject Query.The count is calculated by traversing the Viewobject using next() method until the
last record is retrived. This method hinders the performance of application in case of VO with large number of rows.

getEstimatedRowCount() -> When you need to get quick count of row.Use this method. Method getEstimatedRowCount() actually retrives the count by hitting getQueryHitCount() which runs the select count(*) on the VO query.

getFetchedRowCount() -> Method getFetchedRowCount() counts the number of rows from the Result Set.Returns the number of rows fetched at that point of time.

In Short –

-> When you need to iterate all row to get or check some attribute value use getRowCount().It can create problem issue.
-> When you just need an count of table use getEstimatedRowCount().

If the application, we need to traverse the rowset all records, such as some of the above every line to get attribute values, you can choose to use getRowCount () method;
And if we only need to know the number of rows set the time, then use getEstimatedRowCount () method,


I am an Oracle ACE in Oracle ADF/Webcenter. Sr Java Consultant-working on Java/J2EE/Oracle ADF/Webcenter Portal/ content and Hibernate for several years. I'm an active member of the OTN JDeveloper/Webcenter forum. Passionate about learning new technologies. I am here to share my knowledge. Give your views and suggestion on [email protected] .

More Posts - Website

Follow Me:
TwitterLinkedInGoogle PlusYouTube