BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I'm trying to insert into a SQL Server table from SAS SPDS table using proc sql.
It is running, but very slow.

~35 million records (~5 GB datasize) in 5 hours.
connection is via ODBC

Is there anything I can tune to make it go faster?


========================== code ==========================
/*****************/
/* SAS SPDS Libs */
/*****************/
LIBNAME src sasspds host="sas01" serv="5190" user="spdsadm" ip=yes schema= "SRC" password="XXXX" compress=yes;

/*****************/
/* SAS SPDS Libs */
/*****************/
libname SQL ODBC dsn=DWSQLServer user=sas password=XXXX schema=dbo;

%let spdssize = 49376m;

%let path=./logs;
%let LogFile="&path/post_insert_prod_model_scores_to_sql.log";
%let LstFile="&path/post_insert_prod_model_scores_to_sql.lst";

Proc printto log=&LogFile print=&LstFile new; run;

options obs=max;

proc sql;

insert into sq.stg_model_score
(id,
model_output_id,
model_score,
model_decile_level,
source_id,
score_date,
scored_by
)
select
id,
model_output_id,
model_score,
model_decile_level,
source_id,
model_scored_date,
model_scored_by
from source.SCORE_PROD_OUTPUT;

run;

quit;
2 REPLIES 2
ChrisNZ
Tourmaline | Level 20
Have you tried the BULKLOAD= and BULKCOPY= options?
deleted_user
Not applicable
support helped.

bulkload= is not available on UNIX
insertbuff= works!

thanks

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1857 views
  • 0 likes
  • 2 in conversation