I have a couple questions that I googled but cant really get a solid answer from my findings. My Questions: When should I use DATA step and when should I use PROC SQL? Almost certain I will get the answer "It depends ...", I would also like to know "on what?". Would converting my current PROC SQL to DATA Step improve the runtime of my below code What I am trying to accomplish: Create a table, details on the table are something like this: Select tb1.v1, tb1.v2 ,... tb1.v8, tb2.v1, Case ... when ... end, tb3.v1, TRIM(tb4.v1) , ... (tb4.V2||tb3.v2) FROM tb1 Inner join tb2 on ... , left outer join tb3 on ..., left outer join tb4 on ... where ... each table is 20 million rows. process used to take 4 hours, before simplified, now it takes about 45 mins (I still think this is too long, maybe I am wrong)
... View more