Use Value Distributions in Templated Queries
mainInstead of static values, you can use distributions to substitute the ? placeholder with a value generated at runtime. This allows for more realistic workload modeling.
Supported distributions depend on the parameter type:
| Type | uniform | binomial | zipfian | scrambled |
|---|---|---|---|---|
| INTEGER | X | X | X | X |
| FLOAT / REAL | X | X | - | - |
| BIGINT | X | X | X | X |
| VARCHAR | X | - | - | - |
| TIMESTAMP | X | X | X | X |
| DATE | X | X | X | X |
| TIME | X | X | X | X |
Distribution Properties:
dist: The distribution type (uniform,binomial,zipfian,scrambled). Required.min: The minimum value the generator can produce. Required.max: The maximum value the generator can produce. Required.seed: A seed for the generator to ensure consistency. Default is0.
<templates>
<template name="MyTemplate">
<query><![CDATA[SELECT * FROM MyTable WHERE id = ?]]></query>
<types>
<type>INTEGER</type>
</types>
<values>
<value dist="uniform" min="0" max="1000" seed="1"/>
</values>
<values>
<value dist="zipf" min="0" max="1000" seed="1"/>
</values>
</template>
</templates>