General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>>>OK I see we don't understand each other and the same test has very different results on either side which makes me think it is not reliable at all. Probably you wouldn't use this always against the sample "Employee" table. I could play with the test a bit and get much different striking results that would tell COPY TO ARRAY is slower more than 100x. ie:
>
>Tamar's paper made the point that COPY TO ARRAY slows down a lot with larger resultsets. I use it for fairly small ones- max 30 array elements. Any more than that and I'd be looking for ways to use a cursor.
Perhaps each new row increases the array instead of increasing by a larger amount to create a buffer and pruning excess rows (once) at the end of the command duration - StringBuffer/Builder AFAIR increase 50% of previous buffer size, which could lead to memory trouble when increasing large arrays
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only