Speeding up data retrieve on customization

You would be better off using a UD Adapter and creating a base BPM to
pass back your specific requirements along with performing all logic
server side.

Or create your own BO and adapter if you have the SDK,

or if the Resource adapter is closer use that as a basis for the dataset
and create a base BPM on that instead under certain CallContext
conditions.



Regards,

Stephen



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of drew.pete
Sent: 01 September 2010 16:27
To: vantage@yahoogroups.com
Subject: [Vantage] Speeding up data retrieve on customization





Recently, I created a customization that retrieves a good amount of data
using a few different adapters. The problem is, it takes quite a while
to get that data, do the calculations, and then populate the ultragrid.
I'm working on exploring new faster ways of getting the data I need.
Based on the following pseudocode, do you have any suggestions?

Sub On change in date() 'of form object

Declare new dataset ds

CreateDS(ds)

Assign ds dataset as datasource to ultragrid

End Sub

Sub CreateDS(ByRef ds)

Declare table

Add columns to table

Add table to ds dataset

Declare Resource Adapter

BO Connect to Resource Adapter

Get data using whereclause(usually returns aboutn 100 to 200 rows)

Loop through each Resource Record

CalcHours()

Populate rows in dataset ds

End Loop

End Sub

Sub CalcHours()

Declare LaborDtlSearch Adapter

BO Connect to LaborDtlSearch Adapter

Filter data using whereclause (usually get about 15 to 20 records)

Loop through each LaborDtlSearch Record

GetJobStds()

Running total calculated using returned JobStds

End Loop

End Sub

Sub GetJobStds()

Declare JobOperSearch Adapter

BO Connect to JobOperSearch Adapter

Filter Data using whereclause (usually returns 1 record)

Set values of variables passed into sub

End Sub

Thank you in advance,

Drew



[Non-text portions of this message have been removed]
Recently, I created a customization that retrieves a good amount of data using a few different adapters. The problem is, it takes quite a while to get that data, do the calculations, and then populate the ultragrid. I'm working on exploring new faster ways of getting the data I need. Based on the following pseudocode, do you have any suggestions?

Sub On change in date() 'of form object

Declare new dataset ds

CreateDS(ds)

Assign ds dataset as datasource to ultragrid

End Sub

Sub CreateDS(ByRef ds)

Declare table

Add columns to table

Add table to ds dataset

Declare Resource Adapter

BO Connect to Resource Adapter

Get data using whereclause(usually returns aboutn 100 to 200 rows)

Loop through each Resource Record

CalcHours()

Populate rows in dataset ds

End Loop

End Sub

Sub CalcHours()

Declare LaborDtlSearch Adapter

BO Connect to LaborDtlSearch Adapter

Filter data using whereclause (usually get about 15 to 20 records)

Loop through each LaborDtlSearch Record

GetJobStds()

Running total calculated using returned JobStds

End Loop

End Sub

Sub GetJobStds()

Declare JobOperSearch Adapter

BO Connect to JobOperSearch Adapter

Filter Data using whereclause (usually returns 1 record)

Set values of variables passed into sub

End Sub

Thank you in advance,

Drew
If you will not be updating the information you can use the dynamic query adapter to run a BAQ including adding filter criteria. The results come back via a data set. The calls are pretty quick so if you need to call different BAQs it should still be faster than using the adapters for individual tables.

In 9 there are update able BAQs which work pretty much like a dashboard but you can change values that get saved back to the DB.

Jim Kinneman
Senior Consultant
Encompass Solutions, Inc

--- In vantage@yahoogroups.com, "drew.pete" <drew.pete@...> wrote:
>
> Recently, I created a customization that retrieves a good amount of data using a few different adapters. The problem is, it takes quite a while to get that data, do the calculations, and then populate the ultragrid. I'm working on exploring new faster ways of getting the data I need. Based on the following pseudocode, do you have any suggestions?
>
> Sub On change in date() 'of form object
>
> Declare new dataset ds
>
> CreateDS(ds)
>
> Assign ds dataset as datasource to ultragrid
>
> End Sub
>
> Sub CreateDS(ByRef ds)
>
> Declare table
>
> Add columns to table
>
> Add table to ds dataset
>
> Declare Resource Adapter
>
> BO Connect to Resource Adapter
>
> Get data using whereclause(usually returns aboutn 100 to 200 rows)
>
> Loop through each Resource Record
>
> CalcHours()
>
> Populate rows in dataset ds
>
> End Loop
>
> End Sub
>
> Sub CalcHours()
>
> Declare LaborDtlSearch Adapter
>
> BO Connect to LaborDtlSearch Adapter
>
> Filter data using whereclause (usually get about 15 to 20 records)
>
> Loop through each LaborDtlSearch Record
>
> GetJobStds()
>
> Running total calculated using returned JobStds
>
> End Loop
>
> End Sub
>
> Sub GetJobStds()
>
> Declare JobOperSearch Adapter
>
> BO Connect to JobOperSearch Adapter
>
> Filter Data using whereclause (usually returns 1 record)
>
> Set values of variables passed into sub
>
> End Sub
>
> Thank you in advance,
>
> Drew
>