Joined: 12 Nov 2007 Posts: 38 Location: Texas, USA
Q. Suppose there are 2 tables accessed in COBOL program. Records are fetched from first table and then on the bases of those records second table is read. Presently result set for first table contains of 2000 records only. After some time result set for first table grew to 8,000,000 and program started to take long time. How to reduce the execution time. One thing I can think of was using join on key, but i/v guy was looking for some other answer.
Also are there any FAQs avialable to learn complex sql queries.
you can seek DBA's help. Ask him to put index's on the column used in query and use index'ed column in where clause( search faster). If this is already there re-building indexes ,would be good ( again DBA).
As for REORG on the table etc.you can RE-BIND also.
But all this DBA stuff.
If we have the query in our hand..may query can be optmized too.