Could you be more specific? "a function...has a FillRow function", do you
mean "uses a FillRow function" or "used by a FillFow function"?
IEnumerable doesn't provide "size" and may not have a size at all (i.e.
infinite), it just means it's something that can be enumerated. If you need
to know the size of the collection, I would suggest using a collection, not
IEnumerable.
--
Browse
http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
"DR" wrote:
Quote:
I have a CLR function thet returns IEnumberable (a table) and it has a
FillRow function. I am returning 10,000 integers from this function. Is
there any way that I can preallocate the resulting table or give SQL server
hint as to how many rows my function will return? It makes me cringe to
think that every time FillRow is called that sql may be doing some memory
allocation to make the resulting table bigger. |