1. A non-transitory computer readable medium comprising instructions which, when executed by one or more hardware processors, causes performance of operations comprising: receiving a database query for execution on a database; identifying a source corresponding to the database query; selecting a modification of the database query based on the source; applying the modification to the database query to obtain a modified database query; selecting one or more partitions, from a plurality of partitions of the database, that are relevant to the modified database query based on a partitioning key associated with the database; and executing the modified database query on the selected partitions, without executing the modified database query on the non-selected partitions, to obtain a first set of results.
1. A non-transitory computer readable medium comprising instructions which, when executed by one or more hardware processors, causes performance of operations comprising: receiving a database query for execution on a database; identifying a source corresponding to the database query; selecting a modification of the database query based on the source; applying the modification to the database query to obtain a modified database query; selecting one or more partitions, from a plurality of partitions of the database, that are relevant to the modified database query based on a partitioning key associated with the database; and executing the modified database query on the selected partitions, without executing the modified database query on the non-selected partitions, to obtain a first set of results. 5. The medium of claim 1 , wherein selecting the modification of the database query based on the source comprises: executing a function using the source as an input to the function.