1. A method for offloading multiple processing operations to an accelerator, the method comprising: receiving, by a processing device, a database query from an application; performing an analysis on the query; identifying a plurality of available accelerators; retrieving a cost information for one or more templates available on each of the plurality of available accelerators; determining a query execution plan based on the cost information and the analysis on the query; and offloading one or more query operations to at least one of the plurality of accelerators based on the query execution plan.