Skip to Main Content

APEX

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!

Source , Default value and SQL query for a select list- impact on performance

Srini-SJan 6 2022

I am having trouble loading a page that has lot of page items and those items are select lists having source and default values (I don't know why it was designed that way) that draw values using a query pointed to DB tables with huge data. The queries have a condition in each of them that one of the page items should not be null, which is null always when page is loaded. User selects the value in that page item and then the select lists can derive list. When I see debug, all the queries are executed and since the page item is null, they can't derive any values and so the select lists don't show any values. Select lists not showing any data is okay, but I guess running each of the queries that don't need to at page load seems to be main cause. I am not sure though.
Example:
select list 1
query

select val,id from data_table where <conditions> and p1_page_item is not null

source

select val from data_table where <conditions> and p1_page_item is not null

default
10

In order to ensure that queries are not run at page load, but only when page item is loaded, I have started to use ajax call back. However, unless I understand how source and default work I won't be able to arrive at a better approach.
Can someone give me a good practical example of how these attributes are used?
Definitely, the way these are configured now seem to be incorrect and once I understand these attributes, I can configure better.

This post has been answered by fac586 on Jan 6 2022
Jump to Answer
Comments
Post Details
Added on Jan 6 2022
11 comments
2,989 views