Skip to content
Advertisement

Tag: stream

Do PostgreSQL server side cursors store the results to disk?

Do PostgreSQL (server-side) cursors store/materialise the entire results set to disk? Context: running some queries with a large number of results and getting disk space errors from the server. Answer Not specifically. But various operations (large sorts, large multi-batch hash joins, set-returning functions, etc.) will spill to disk on their own. I don’t think server side cursors will cause that

How do I safely read from a stream in asp.net?

If: Reading from a stream in a single call to Read is very dangerous. You’re assuming all the data will be made available immediately, which isn’t always the case. You should always loop round, reading until there’s no more data. How should I change the above code to make it ‘less dangerous’? Answer Jon Skeet actually has a really good

Advertisement