cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Cursor Question

sap_cohort
Active Contributor
0 Kudos

Hi, In HANA I heard it is best to use SQL Select Statements vs. Cursor for data selection.  This is supposed to be because using cursor does not allow the system to use parallel processing in the engine.  Is this true?  The reason I ask is becuase a lot of forum questions about SQL show sqlscript with the declare and cursor statements.  I would think everyone would be avoiding this practice except in very specific cases...

THanks for any opinion

Accepted Solutions (1)

Accepted Solutions (1)

lucas_oliveira
Advisor
Advisor
0 Kudos

Hello Kenneth,

Yes, that's true. Using Cursors to iterate over results can kill parallelism. Avoid whenever possible to get the most of the optimizations.

BRs,

Lucas de Oliveira

Answers (0)