10. A non-transitory computer readable storage medium comprising a computer readable program for selection of a provenance dependency function in a stream-based data processing infrastructure to optimize backtracing performance in response to a provenance query, wherein the computer readable program when executed on a computer causes the computer to perform the steps of: determining performance of a set of dependency functions associated with an analysis component for determining relevancy of each input event received by the analysis component, wherein each of the dependency functions provides a different, respective method for determining a respective data provenance of a given output event for the analysis component; determining the relevancy of each input event according to each of the dependency functions and storing a record of relevant events according to a recording method; aggregating relevancy results of the dependency functions and ordering the dependency functions according to a criterion indicating the relevancy of the input events provided by the dependency functions; for the given output event, selecting between the dependency functions to obtain a best dependency function from the set of dependency functions based on the ordering; and providing the respective data provenance for the given output event provided by the best dependency function using an input event recording method associated with the best dependency function according to the criterion.
16. The computer readable medium as recited in claim 10 , wherein the providing the respective data provenance includes looking up the given output event in a table and determining whether a set of input event entries exist which are associated with the given output event.