560 pts.
 Join Logical files and SQL views
I hear Join Logical files are not supported in SQL DDL. But you have the SQL view instead. The shop I work for wants to use SQL DDL. But they have numerous interactive programs that use join logical files. If views cannot have keys, how on earth are they going to replace the join logical files in the program?

Software/Hardware used:
ASKED: July 30, 2009  5:11 PM
UPDATED: July 30, 2009  6:47 PM

Answer Wiki:
You're right views aren't the same as joins. A view contains the rules for selecting records -- rules no keys (indexes) SQL Indexes can be created on the physical files. Indexes are keys - no rules (some rules in v6r1). If the indexes needed don't exist SQL will create temp indexes. SQL will analyze the request and select or make the best indexes to do the job. SQL gives you lots of ways to get data other than joins. When your request can return more than one record you --> must <-- use a cursor. Alternative - Native I/O still works fine, really. Phil /////////////////////////////////////////////////////////// SQL is often faster but not always. Indexes are critical for performance and these can be determined with the analyzer on Navigator. You can do your joins in views or right in the SQL. Shop standards are important. Good luck Phil
Last Wiki Answer Submitted:  July 30, 2009  6:47 pm  by  philpl1jb   44,060 pts.
All Answer Wiki Contributors:  philpl1jb   44,060 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

And for the printer files, does it mean I have to use a cursor? In my tests, using a cursor is slower than reading the files and directly outputting them to the printer file…What’s the alternative in SQL really?

 560 pts.