cancel
Showing results for 
Search instead for 
Did you mean: 

Cursor looping is very slow in ASE 16 than ASE15.7.

0 Kudos

Just upgrade from ASE15.7 to ASE 16. Found that Cursor Looping in stored procedures is very slow in ASE 16 than ASE15.7.

Any suggestions?

Accepted Solutions (0)

Answers (1)

Answers (1)

sladebe
Active Participant
0 Kudos

Not sure if this is your problem or not, but there's a lot more work done in the auditing system in ASE 16 because ASE logs SQL text for every audited event (there's no way to turn this off). So check to see if there are a gazillion auditing entries for the operation inside the cursor loop.

Also, in certain circumstances, auditing operations in a cursor loop can use up procedure cache. So also check to see if your procedure cache is getting used up (sp_monitorconfig "procedure cache")

Good luck

Later edit: Oh, I guess the first thing to check is the query plan of the operation inside the cursor loop. I should've said that first.