sql - How does a database 'cursor' work? -


with drivers relational databases, default , preferred way access results use cursor or iterator.

what i'm guessing database like:

  1. runs query.
  2. prepares result, stores in ram?
  3. returns cursor result client.

whenever database driver gets call fetch next result, passes cursor database, gives next result.

however, i'm not sure if that's correct. 1 thing stumps me if database client , database server on different nodes , communicating via network, isn't slow? use such lazy approach? makes sense not return data, there middle path takes?

the database sends complete result set in 1 go. cursor/iterator in driver on client side.


Comments

Popular posts from this blog

jQuery clickable div with working mailto link inside -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -