Once you alter the connection to the replicate database and set dsi_compile_enable to on, Replication Server uses these parameters to determine when to start and stop transaction grouping and compilation:
dsi_compile_max_cmds – specifies, in number of commands, the maximum size of a group of transactions. When HVAR reaches the maximum group size for the current group that it is compiling, HVAR starts a new group.
If there is no more data to read, and even if the group does not reach the maximum number of commands, HVAR completes grouping the current set of transactions into the current group. The default is 100,000 commands.
dsi_bulk_threshold – specifies the number of net row change commands after compilation has occurred on a table for a command type, that when reached, triggers Replication Server to use bulk copy-in on that table for the same command type. The default is 20 net row change commands.
dsi_command_convert – specifies how to convert a replicate command. A combination of these operations specifies the type of conversion:
d – delete
i – insert
u – update
t - truncate
none – no operation
Combinations of operations for dsi_command_convert include i2none, u2none, d2none, i2di, t2none, and u2di. The operation before conversion precedes the “2” and the operations after conversion are after the “2”. For example:
d2none – do not replicate the delete command. With this option, you do not need to customize the rs_delete function string if you do not want to replicate delete operations.
i2di,u2di – convert both insert and update to delete followed by insert, which is equivalent to an autocorrection.
t2none – do not replicate truncate table command.
The default for dsi_command_convert is none which means there is no command conversion.
HVAR automatically sets the Sybase-recommended values for dsi_compile_max_cmds, dsi_bulk_threshold, and dsi_command_convert, which are the default values. However, you can specify your own values to tune performance in your replication environment. For example, if you want to adjust these values from the default values when you enable HVAR:
alter connection to SYDNEY_DS.pubs2 set dsi_compile_enable to ‘on’ set dsi_compile_max_commands to ‘50000’ set dsi_bulk_threshold to ‘15’ set dsi_command_convert to ‘i2di,u2di’ go
See “alter connection,” in Chapter 3, “Replication Server Commands” in the Replication Server Reference Manual for full descriptions of these parameters.