Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Eliminating cartesian merge
Terry Dykstra wrote:
> Couldn't help but notice:
> AND ( job.effdt >= TO_DATE (TO_CHAR (SYSDATE, 'YYYY-MM-DD'), 'YYYY-MM-DD')
>
> Why so complicated? I would code:
>
> AND ( job.effdt >= TRUNC(SYSDATE)
>
I've noticed that too, but this is delivered Peoplesoft code that we're not supposed to change.
If I just remove the distinct from the main query, it executes in seconds. There are only about 5000 rows returned by the non-distinct version of th equery. Why is simply adding a distinct increasing the the time from a few seconds to minutes to only sort 5000 rows?
-- To reply by email remove "_nospam"Received on Wed Sep 28 2005 - 10:00:35 CDT