Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>>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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement