Sethington
Technical User
I have a query that is taking about 10 seconds to execute. I'm trying to optimize the query. Here is the code:
SELECT ACCOUNT_LEVEL,PROGRAM,ANNUAL_FEE, APR_FLOOR_RATE,CASH_ADV_RATE,LATE_FEE,NSF_FEE,APR_RATE,APR_BASIS,LATE_GRACE_DAYS,
DELINQ_MSG_MERCH,DELINQ_MSG_CASH,ACCRUAL_DATE,PAPER_GRADE,REQ_PC_ELIG,STRATEGY,
BANK,SYSTEM,PRINCIPLE,AGENT,APR_BASE_VALUE,CASH_ADV_FEE_RATE,DELINQ_PURCHASE_MARGIN_RATE,
DELINQ_CASH_MARGIN_RATE FROM BANK.VW_PRODUCT_CATALOG WHERE OFFER_CODE = ? AND CARD_TYPE=? WITH UR
My question is would this query run faster if I create a view that contains only the columns that I need and rewrite the query as:
SELECT * FROM BANK.VW_PRODUCT_CATALOG WHERE OFFER_CODE = ? AND CARD_TYPE=? WITH UR
Or
SELECT ACCOUNT_LEVEL,PROGRAM,ANNUAL_FEE, APR_FLOOR_RATE,CASH_ADV_RATE,LATE_FEE,NSF_FEE,APR_RATE,APR_BASIS,LATE_GRACE_DAYS,
DELINQ_MSG_MERCH,DELINQ_MSG_CASH,ACCRUAL_DATE,PAPER_GRADE,REQ_PC_ELIG,STRATEGY,
BANK,SYSTEM,PRINCIPLE,AGENT,APR_BASE_VALUE,CASH_ADV_FEE_RATE,DELINQ_PURCHASE_MARGIN_RATE,
DELINQ_CASH_MARGIN_RATE FROM BANK.VW_PRODUCT_CATALOG WHERE OFFER_CODE = ? AND CARD_TYPE=? WITH UR
My question is would this query run faster if I create a view that contains only the columns that I need and rewrite the query as:
SELECT * FROM BANK.VW_PRODUCT_CATALOG WHERE OFFER_CODE = ? AND CARD_TYPE=? WITH UR
Or