The Power Tools v1.0 release adds a new data generator, named the “Sequential Data Bound Generator”. Since there already exists a data generator named the “Data Bound Generator” this yields the question what the difference is between the two is and when to use either one of them.
Data Bound Generator
The Data Bound Generator, takes the query you specified and uses it to fill a local dictionary. After query is execute, the results are used to fill a dictionary, the generator disconnects from the data source specified and randomly selects values from the dictionary and contributes the values to the column you bound the generator to.
This implies a couple of things:
- The complete result set from the query has to fit in memory and is held in memory for the duration of the generation. (If this is not the case the data generator will fail with an out of memory error.)
- The connection is only used to execute the query and fetch the results in to the dictionary, after that the connection is no longer used.
- You cannot assign a distribution to the Data Bound Generator; the only pattern used to select from the dictionary is random. (This will get addressed in a later release, so you can specify a distribution to select from the dictionary using a statistical distribution pattern.)
Sequential Data Bound Generator
The Sequential Data Bound Generator, takes the query you specified, executes the query and fetches one row at the time and returns the value to the column bound to the generator.
This implies that:
- Only a single row of the query is in memory at all times.
- The connections used to execute the query and fetch the results is in use for the duration of the generation plan execution
- The order in which values are returned are determined by the query statement, assuming you provides an ORDER BY clause in the query.
Both providers can connect to the same providers and are based on the same query execution code, only the way results are handled is different between the two.
I hope this explains the differences between the two providers and makes it easier to determine when to use which data generator.