Home » Developer & Programmer » Forms » lov performance
lov performance [message #192143] Mon, 11 September 2006 03:55 Go to next message
maoro
Messages: 310
Registered: May 2005
Senior Member
hello
i have a form used to insert a record into some table, in this form i use 2 lov based on 2 diferent tables;
i noticed that there is a small like 5 seconds delay between clicking the save button and getting the prompt back,
i removed the lov the delay is gone...
so what is my alternative especially that love are based on table fields that get updated,
thanks in advance
oracle DS 9i
oracle database 10G
windows xp 2.4ghz 1 gb ram
Re: lov performance [message #192248 is a reply to message #192143] Mon, 11 September 2006 09:50 Go to previous messageGo to next message
jowahl
Messages: 82
Registered: May 2006
Member
did you set the item property "validate in lov=y"?
if so, forms checks if you have entered a valid value by checking it against the lov list. if your lov returns many rows, it takes less or more time to populate this.

workaround: set item property "validate in lov=n" and write an WHEN-VALIDATE-ITEM trigger like this:

DECLARE
   v_cnt INTEGER;
BEGIN
   SELECT COUNT(*)
   INTO   v_cnt
   FROM   <table>
   WHERE  <value> = :BLOCK.ITEM;
   --
   IF v_cnt = 0 THEN
      MESSAGE('Invalid value!');PAUSE;
      RAISE FORM_TRIGGER_FAILURE;
   END IF;
END;

Re: lov performance [message #192386 is a reply to message #192143] Tue, 12 September 2006 02:24 Go to previous messageGo to next message
maoro
Messages: 310
Registered: May 2005
Senior Member
thank you for ur reply
i found out that the lov isnt the problem but when i finish entering data in the form and click save to insert the record in the table there is a clear_form function , to clear the form for input again, that's making the delay
i tried clear_block,clear_item
same problem
thanks again
hopefully u can help
Re: lov performance [message #192388 is a reply to message #192386] Tue, 12 September 2006 02:35 Go to previous messageGo to next message
jowahl
Messages: 82
Registered: May 2006
Member
usually a CLEAR_FORM/CLEAR_BLOCK should cause no delay ...
maybe there are other triggers?
you could run the form in debug mode (Tools -> Preferences -> Runtime -> Debug Messages) to watch what triggers are fired.

maybe this will help you to identify what's wrong ...?
Re: lov performance [message #192457 is a reply to message #192143] Tue, 12 September 2006 08:20 Go to previous messageGo to next message
maoro
Messages: 310
Registered: May 2005
Senior Member
thanks again
i removed the 2 lov from the form and everything runs so fine;
so im sure that the problem is when the clear_form get executed it also flush the lov records thats whay it takes time..
any help there
thanks
Re: lov performance [message #192589 is a reply to message #192457] Tue, 12 September 2006 23:02 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I had this problem at another place. You need to tune your LOV queries. I know this sounds wierd but if you use some tool to look at the database while your form is refreshing you will see that an LOV that you have not used is being executed, without arguments, that is, it is retrieving all records. Add a 'hint' to use the index and the problem will probably go away.

David
Previous Topic: conditional updation of the database item
Next Topic: read data created of the file
Goto Forum:
  


Current Time: Tue Dec 06 06:10:35 CST 2016

Total time taken to generate the page: 0.10557 seconds