Re: forms 4.5 problem

From: Steve Cosner <stevec_at_csufresno.edu>
Date: Tue, 16 Nov 1999 09:47:32 -0800
Message-ID: <383198B4.7E2CBCEF_at_csufresno.edu>


Pete Hawdon wrote:
> In the called form, i have defined a 'default where' clause that will return
> anything from 1 - 8000 records (depending on the data).
> The number that the user enters is the record that will be displayed, but i
> want them to be able to scroll up and down through the (1 - 6000) records at
> will. (I have also a post-query trigger that sets up various non-base things
> for each record).
>
> I issue a go_record(number) command in the when_new_form_instance trigger to
> ensure that it is the record displayed. My problem is that the larger the
> number entered by the user, the slower the performance of getting to the
> required record is. Is there any way around this?
>
> Ie user enters 5343 and the default where returns 7500 records. This is
> quite slow to display record 5343. If user had entered 7, this would be very
> fast.

Due to some things Forms does behind the scenes, it is not realistic to fetch more than a few hundred rows into a form. Fetching more records gets progressively slower -- seems that Forms is pretty inefficient when it does this. And then you are firing a post-query trigger for each record, making one or more round-trip to the server for each record. I am amazed you can get anything back when you request something over 1000.

You should re-think your approach, and find some way of allowing the user to go more directly to the requested record. One method would be to locate the record requested on a server-side stored procedure, follow that with a descending query to find maybe the one-hundredth record prior to the requested one, then return that record. Set your form's default where to start with THAT record, and fetch just 100 records instead of the thousands.

Steve Cosner Received on Tue Nov 16 1999 - 18:47:32 CET

Original text of this message