A method for processing a query using a coprocessor, comprising: determining that execution of the query involves a particular operation; in response to determining that execution of the query involves a particular operation, generating a command that includes, as parameters of the command, first address data that is used to identify input data to be read by the coprocessor, and second address data that is used to identify a lookup vector, wherein the lookup vector is generated based on a dimension table; causing the command to be stored in a memory that is separate from the coprocessor; processing, by the coprocessor, the command by: reading the command from the memory; causing the input data to be read from a location indicated by the first address data, wherein the input data comprises a plurality of values; causing the lookup vector to be read from a location that is indicated by the second address data; for each value of the plurality of values, identifying a position within the lookup vector, and retrieving a result from the lookup vector at the position that corresponds to said each value; generating a result data based on the identifying for each value of the plurality of values; causing the result data to be stored; wherein the method is performed by one or more computing devices; and wherein the steps of determining, generating a command, and causing the command are performed by a general purpose microprocessor executing a query execution engine, wherein the general purpose microprocessor is separate from the coprocessor. determining that execution of the query involves a particular operation; in response to determining that execution of the query involves a particular operation, generating a command that includes, as parameters of the command, first address data that is used to identify input data to be read by the coprocessor, and second address data that is used to identify a lookup vector, wherein the lookup vector is generated based on a dimension table; causing the command to be stored in a memory that is separate from the coprocessor; processing, by the coprocessor, the command by: reading the command from the memory; causing the input data to be read from a location indicated by the first address data, wherein the input data comprises a plurality of values; causing the lookup vector to be read from a location that is indicated by the second address data; for each value of the plurality of values, identifying a position within the lookup vector, and retrieving a result from the lookup vector at the position that corresponds to said each value; generating a result data based on the identifying for each value of the plurality of values; causing the result data to be stored; wherein the method is performed by one or more computing devices; and wherein the steps of determining, generating a command, and causing the command are performed by a general purpose microprocessor executing a query execution engine, wherein the general purpose microprocessor is separate from the coprocessor. reading the command from the memory; causing the input data to be read from a location indicated by the first address data, wherein the input data comprises a plurality of values; causing the lookup vector to be read from a location that is indicated by the second address data; for each value of the plurality of values, identifying a position within the lookup vector, and retrieving a result from the lookup vector at the position that corresponds to said each value; generating a result data based on the identifying for each value of the plurality of values; causing the result data to be stored; wherein the method is performed by one or more computing devices; and wherein the steps of determining, generating a command, and causing the command are performed by a general purpose microprocessor executing a query execution engine, wherein the general purpose microprocessor is separate from the coprocessor.