I have some multi-member AS400 files that I need to create single-member logicals files in order to execute some SQL SELECT queries (via ODBC or JDBC). These files have many fields in them that I will never need for my ODBC queries. I want to have the best performance possible because I think these queries will be used alot. My questions:
1) When creating the single member logicals, should I only include the fields that I will need in the SQL queries? Or should I just create the logical to include all fields that exist in the physcial file? Which will cause the application to retrieve the data faster?
2) Should I use an asterisk to SELECT all fields in the single member files/tables, or should I list out only the fields that I need to be returned in the query? (SELECT * FROM ASFILE1) vs. (SELECT FLD1, FLD2, FLD3 FROM ASFILE1)
I've always wondered this and thought I'd post this to see what comments I get? Thanks, sulzener.