Wide tables with large column names were slow to call the CopyIn and CopyInSchema functions.
Created makeStmt to reduce duplication between the CopyIn and CopyInSchema functions.
Created BufferQuoteIdentifier to efficiently generate column names and reduce string allocations.
Created BenchmarkCopy which tests only CopyIn's ability to copy large data fast, the results showed that the changed copy ran at 20 ms versus the original which was around 700 ms.
Wide tables with large column names were slow to call the CopyIn and CopyInSchema functions. Created makeStmt to reduce duplication between the CopyIn and CopyInSchema functions. Created BufferQuoteIdentifier to efficiently generate column names and reduce string allocations. Created BenchmarkCopy which tests only CopyIn's ability to copy large data fast, the results showed that the changed copy ran at 20 ms versus the original which was around 700 ms.