Help using Base SAS procedures

how make update faster?

Reply
N/A
Posts: 0

how make update faster?

I have a SPDS table and I want to set all values in a particular column to NULL or ' ' (empty string).

It is taking very long to process, the table is ~30million records.
Here is my code

proc sql;
update data.account set ssn=' ';
quit;
Super User
Posts: 5,256

Re: how make update faster?

I don't know for sure, but my gut feeling says that recreating the table using data set would be faster.
The downside is that you have to recreate any existing indexes.
Even a bit faster would be to do a SQL pass-thru to do the job (create table...).

On the other hand, your example looks like a one-time fix, so it doesn't really needs to be optimized...?

/Linus
Data never sleeps
Super Contributor
Posts: 359

Re: how make update faster?

I have found in the past that updates like this are quite often faster if you drop the index first, then reindex it after the update.
Ask a Question
Discussion stats
  • 2 replies
  • 104 views
  • 0 likes
  • 3 in conversation