Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: How to navigate through a cursor?

$
0
0

Hi Stefan,

 

first of all, working with cursors generally should be avoided, as this is always row by row (or "slow by slow" coined by Tom Kyte) processing.

Instead set-oriented commands should be used, like SQL commands, intermediate table variables, CE-functions etc.

 

Anyhow, if you do work with cursors, your application logic processes one row at a time.

That's the whole point here. By the time you open the cursor, the query that defines the cursor is executed and the result set is materialized in main memory.

"Fetching" the next row doesn't actually mean to copy data over to some other place but to move the pointer into the intermediate result set one position further.

Therefore, bulk fetching doesn't really make any sense.

In Oracle on the other hand, the result set is not necessarily materialized (e.g. NL joins can be sequentially processed and pipelined functions in general).

For such scenarios, a fetch always implies computation and eventually waiting, so pre-fetching or bulk fetching can improve the performance for PL/SQL code.

 

In short: bulk fetching for SAP HANA SQLScript is just another feature that doesn't apply.

 

- Lars


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>