not include a sufficient amount of relevant input data then the input data elements are designated for reference in response to a provenance query application_number US 201313780093 A description the present principles provide for optimizing response time of provenance queries in stream processing systems at least one provenance function is provided that maps each output data event to a set of input data events a mechanism for evaluating statistics of input data streams at runtime and prior to provenance queries with respect to a given provenance function is provided an evaluation method is used to select an efficient backtracing method for responding to a provenance query such that the method optimizes response time a method for further optimizing the backtracing method selection to take into consideration additional resources is also presented the resources include but are not limited to memory and speed a system and method are provided for adaptively optimizing the response times of queries regarding data provenance in stream processing systems in accordance with one aspect a method for determining prior to a provenance query the most efficient means for mapping a given output event associated with a processing element to a set of predicating input events in response to a provenance query is based on statistics of the input streams consumed by the processing elements the processing element has at least one provenance function associated with it and a method for evaluating the statistics of the input data consumed by the processing element is provided during execution the input data statistics are evaluated to determine an efficient method for associating output events with sets of input events in anticipation of a provenance query regarding a given output event this may be.