Sybase Question:
Download Questions PDF

Alternative to row at a time processing in Sybase?

Answer:

Someone asked how they could speed up their processing. They were batch updating/inserting gobs of information. Their algorithm was something as follows:
... In another case I do:
If exists (select record) then
update record
else
insert record


I'm not sure which way is faster or if it makes a difference. I am doing this for as many as 4000 records at a time (calling a stored procedure 4000 times!). I am interesting in knowing any way to improve this. The parameter translation alone on the procedure calls takes 40 seconds for 4000 records. I am using exec in DB-Lib.

Download Sybase Interview Questions And Answers PDF

Previous QuestionNext Question
When should I execute an sp_recompile in Sybase?Would RPC or CT-Lib be better/faster?