Sorry, I reversed the last part. adddate(p.MLS_Timestamp, 125) >= timestamp is FASTER than p.MLS_Timestamp >= subdate(timestamp,125).
Any suggestions? Thanks! John Quoting Peter Willadt <[EMAIL PROTECTED]>: > Hello, > > This query executes very fast... > > > [...] > > > > While this query takes over 30 seconds to execute: > > > [...] > > > > The only difference between the queries is: > > p.MLS_Timestamp >= subdate(timestamp,125) is replaced by > > adddate(p.MLS_Timestamp, 125) >= timestamp > > > in the first case there is one subtraction for the query, > while in the second case there is one addition for every candidate row. > So the results should be quite expected (as subtraction and addition take > about probably the same time). > > Peter Willadt > > > _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
