brianc / node-pg-cursor

Query cursor extension for node-postgres
78 stars 30 forks source link

Does pg-cursor initiate a server-side cursor, or is only for "streaming"? #49

Open vance opened 5 years ago

vance commented 5 years ago

Sorry if ignorant here. Since cursors open a transaction, I assume it will be left to the query planner to determine the best way to execute.

Just wondering about the server performance impact of doing a large cursor query with some joins. It should make an initial up-front temporary table if the result is large enough, then stream from that temp result set, right? It's not going to re-open a new transaction every time?

that is, is this a client-side only cursor, or does it issue a server-side cursor as well?