Table functions

A table function that receives arguments that are all literals runs on the host. A table function registered as --noparallel runs on the host. All other table functions typically run on the SPUs, but there are some situations where the NPS Query Optimizer moves processing to the host. Your choice between host and SPU (whether to use --noparallel or not) for table functions has implications. A table function AE returning data at the end of the input can return more rows when running on the SPU than on the host, as it executes n times for n data slices instead of a single time on the host. If the input is on the host (external table, _v_dual, or a temporary table in the plan), and the optimizer chooses to evaluate it on the SPU, it distributes the data to the SPUs using random distribution. Shapers always run on the host, even if the table function logic runs on the SPU. For more information, see Introduction to shapers and sizers.