I have wondered this, and thought maybe I asked already, but I can't find it on searching. Not until I finish writing this will I find it, if it exists, right?
I have a table of retail stores with ~3000 records corresponding to between 1 to 300 stores for 21 retailers. I am writing a script to acquire data for the stores for 4-5 of the retailers per script call. The 4-5 retailers that the script will address will be defined in an incoming list variable - vc_rtlrs_ids - contain the retailers' ids (unique). The data to acquire for each retailer in the list is 1) store count for the retailer (sum of all the retailer's stores) 2) the number of checkout lanes for all stores (sto_ln_cnt is a numeric field with a value present in all records) 3) the number of stores with self_serve lanes (lane_types is a field containing of std_full, std_expr, ss_full, ss_expr, any combo of these)
My question is, for a networked, multi-user environment, is it best to:
1. Pull all the store records using table.external_content get() filtering for the 4-5 retailer's stores using inlist2() into a list variable and parse the data in the result of tercg() to acquire the 3 data points needed. Pro- one table opening,fetch,table close. Local counting and filtering the variable from tercg() to parse out the data points is fast and no network overhead. Con- could be up to 500 records in the tercg() variable resulting in a single big datablob transfer overhead to the network.
2. Loop through the 4-5 retailers gathering the data using 3 filtered calls to the table (one for each of the three data points) for each retailer.
Pro- smaller data packet through the network Con - multiple table openings, filterings, closings.
I have a table of retail stores with ~3000 records corresponding to between 1 to 300 stores for 21 retailers. I am writing a script to acquire data for the stores for 4-5 of the retailers per script call. The 4-5 retailers that the script will address will be defined in an incoming list variable - vc_rtlrs_ids - contain the retailers' ids (unique). The data to acquire for each retailer in the list is 1) store count for the retailer (sum of all the retailer's stores) 2) the number of checkout lanes for all stores (sto_ln_cnt is a numeric field with a value present in all records) 3) the number of stores with self_serve lanes (lane_types is a field containing of std_full, std_expr, ss_full, ss_expr, any combo of these)
My question is, for a networked, multi-user environment, is it best to:
1. Pull all the store records using table.external_content get() filtering for the 4-5 retailer's stores using inlist2() into a list variable and parse the data in the result of tercg() to acquire the 3 data points needed. Pro- one table opening,fetch,table close. Local counting and filtering the variable from tercg() to parse out the data points is fast and no network overhead. Con- could be up to 500 records in the tercg() variable resulting in a single big datablob transfer overhead to the network.
2. Loop through the 4-5 retailers gathering the data using 3 filtered calls to the table (one for each of the three data points) for each retailer.
Pro- smaller data packet through the network Con - multiple table openings, filterings, closings.
Comment