All tables are indexed, so this takes no time.
data ACCOUNT_444513219790;
set XODSM.ACCOUNT_201101-XODSM.ACCOUNT_201112
XODSM.ACCOUNT_201201-XODSM.ACCOUNT_201212
XODSM.ACCOUNT_201301-XODSM.ACCOUNT_201312
XODSM.ACCOUNT_201401-XODSM.ACCOUNT_201412
XODSM.ACCOUNT_201501-XODSM.ACCOUNT_201512
XODSM.ACCOUNT_201601-XODSM.ACCOUNT_201606;
where IP_LOCAL_ID='444513219790';
run;
If I use a view, it takes minutes since the where clause is processed in the second data step.
data _V_ACCOUNTS/view=_V_ACCOUNTS;
set XODSM.ACCOUNT_201101-XODSM.ACCOUNT_201112
XODSM.ACCOUNT_201201-XODSM.ACCOUNT_201212
XODSM.ACCOUNT_201301-XODSM.ACCOUNT_201312
XODSM.ACCOUNT_201401-XODSM.ACCOUNT_201412
XODSM.ACCOUNT_201501-XODSM.ACCOUNT_201512
XODSM.ACCOUNT_201601-XODSM.ACCOUNT_201606;
run;
data ACCOUNT_444513219790;
set _V_ACCOUNTS;
where IP_LOCAL_ID='444513219790';
run;
I would be better if the where clause was processed by the view.
Suggestion: Any where clause on a view should be passed on for processing by the view whenever possible.
An example of a case when this is not possible is when data sets include the where=option.
Another example is when the point= or key= options are used in the view.