Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Mathias.

Asked: November 19, 2020 - 12:28 pm UTC

Last updated: December 08, 2020 - 5:30 am UTC

Version: 18.2.0.00.12

Viewed 1000+ times

You Asked

Item is popup LOV witch is based on db link's view. Even with a few records and up to 50 session Ingres database crashes. Is possible also happens with item based in database column? Page can reach more than 100 concurrent session due to cashiers operates in.

Any recommendation to tune page and make it more efficient? There 6 items that needs to use List of Values.

Log message data retrieve this query for example where COD_TIPO_DOC_ID column is a numeric value:

Rewrite SQL to: select a.* from (SELECT COD_TIPO_DOC_ID || '- ' || TIPO_DOC_ID AS D,
       COD_TIPO_DOC_ID AS R
FROM TIPO_DOCUMENTO_ID
WHERE COD_TIPO_DOC_ID  IN (0, 1, 2)
)a
where "R" = :p$_search_string
 and ROWNUM <= :p$_max_rows


We're limiting those values due to requirements. The "R" is generated by Oracle APEX with search string to use in popup LOV item.

Thanks in advance.

Mathias

and Connor said...

Add an index to COD_TIPO_DOC_ID and also add a FIRST_ROWS(1) hint on the assumption that your ":p$_max_rows" is a reasonably small number.

That should let it walk the index for the just the first 'n' rows and then stop

Is this answer out of date? If it is, please let us know via a Comment

More to Explore

Performance

Get all the information about database performance in the Database Performance guide.