开发者

Does SQL Server have a parameter like "array size" in oracle?

开发者 https://www.devze.com 2023-03-16 08:44 出处:网络
As mentioned in title. I wanna know that does SQL Server can partially execute a SQL like oracle do? means server wait client to process the data in last network packet and then fill next packet I not

As mentioned in title. I wanna know that does SQL Server can partially execute a SQL like oracle do? means server wait client to process the data in last network packet and then fill next packet I noticed that when you execute a select statement in SQLServer Management studio, you can get the first rows immediately while the statement is still running. But I cannot get this in ADO component. All I can think about is use server-side cursor and use non-ke开发者_开发问答yset type cursor. But ADO use sp_cursoropen and sp_cursorfetch to do this. Not using cache size like sql*plus do. It mains it is client side behavier, not like the phenomenon in SSMS. I want know why.


It appears that the corresponding feature in SQL Server is known as Array Fetch Size. (Discussed here, for example.)


Are you referring to SET ARRAYSIZE, an SQL*Plus command?

If so, an analogous setting might be SET ROWCOUNT. There may be some subtleties I'm missing here though, since I don't use Oracle on a daily basis.

If I've guessed wrong, then can you expand on what "Array Size" does, since I can't find any hits that seem relevant when searching for Oracle Array Size.


Actually, re-reading stuff I can find about set arraysize in SQL*Plus, it seems to be quite different from ROWCOUNT. But the description (which seems to control how many rows are returned in each round trip, but not limiting the overall number of rows) doesn't seem to match your description "partially execute a SQL like oracle". I can't think of anything off the top of my head that would control the batching of results returned to the client.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号