Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why is executeQueryForCollection being called so many times

Paul (MITsa)Jun 19 2024

Jdeveloper/ADF 12.2.1.4.0 Ful stack

Hi

We've been having a look at the performance of our application and have seen that the method
exeuteQueryForCollection was being called a lot of times.

We created a small test application with three query based (no entity object) view objects VO_1, VO_2 and VO_3.
Each view object does a select * from a table.
VO_1 has a where clause which prevents any rows from being returned.

We then created view links as follows : VO_1 -> VO_2 -> VO_3
(VO_1 is the master, VO_2 is a detail table of VO_1 and VO_3 is a detailed table for VO_3)

In each view object we overrided the method exectueQueryForCollection in order to add a message in the log (System.out.println...)

The 3 view objects were then added to a page as 3 separate af:Table (s)

A button was added which calls a method in the application module.
This method simply gets the VO_1 and then performs an executeQuery()

When running the application we see that when the button is clicked and the executeQuery is ran we have the
following sequence of executeQueryForCollection

VO_1
VO_2
VO_3
VO_1
VO_2
VO_3
VO_3

I can understand that each view objects executeQueryForCollection could be called once due to the relation between the tables.
But why do VO_1, VO_2 and VO_3 executeQueryForCollection get called a second time and VO_3 executeQueryForCollection gets called for a third time ?

What is the impact of these "extra" calls to executeQueryForCollection ? (AS memory use etc..)

Thanks
Paul

Comments
Post Details
Added on Jun 19 2024
2 comments
343 views