Page 1 of 1

Fetching Previous Day's date

PostPosted: Mon Jul 06, 2009 12:20 pm
by bhaskar.naidu
Hi,
In my JCL, I am using DNSTIAUL to fetch records from a table which has a huge number of records in which My where clause is trying to get the previous day's date using the timestamp from the table. This Query is taking a lot of time in executing the JCL.
Is there any way by which I can tweak my query and reduce the execution time?

Regards,
Bhaskar

Re: Fetching Previous Day's date

PostPosted: Mon Jul 06, 2009 11:51 pm
by dick scherrer
Hello,

If the timestamp is not a key/index, the entire table must be read to select the rows you want.

You might try unloading the entire table and then use your sort product to select the rows you want to use. Suggest you ask your dba which is the fastest tool to use to unload an entire table on your system.