Hi Team,
I have below query which takes 30minutes to complete.
Could you please suggest any bottleneck here.
proc sql;
create table X as ( select * from Y a inner join Z b on input(b.emp_id,11.) = a.emp_id
where a.sale_dt >= b.sale_dt and a.sale_dt < b.sale_last_dt );
quit;
Source Table A has: 3.6M data & B table has 3.3M data.
Output of this query gives 3.5M data and its taking 30 min to complete. Is there any way to reduce the process time.
Please suggest?
Here is :
proc sql;
create table X as ( select * from Y a inner join Z b on input(b.emp_id,11.) = a.emp_id
where a.sale_dt >= b.sale_dt and a.sale_dt < b.sale_last_dt );
quit;
Make a data step before SQL to convert this variable by INPUT().
data Y1; set Y; new_emp_id=input(emp_id,11.); run; proc sql; ..................
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.