Pramod Verma wrote:Correct, assuming you are not testing around midnight :).
Since I am using Trunc() in the where clause so timing should not matter much. Also I manually ruled out records which were updated after the job run.
Function used in the query is having invoker rights. Function is also created in the same user schema where this query is hosted.And that's creates run time difference. Jobs ignore roles while roles are honored interactively.