ora=<instaclient-install-dir>
gcc=
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <string> | |
#include <iostream> | |
#include <fstream> | |
#include <sstream> | |
class csvfile; | |
inline static csvfile& endrow(csvfile& file); | |
inline static csvfile& flush(csvfile& file); |
When builing large strings with lots of concatenations in PL/SQL, custom approach like "use varchar2(32000) buffer to reduce the number of dbms_lob calls" makes sense even for Oracle 12.1.0.2.0.
The response time improvement is 4..300+ times :) depending on the DB version and API you use.
Note that simple v_clob || TO_CHAR (SYSTIMESTAMP) || ', '
==> v_clob || TO_CLOB(TO_CHAR (SYSTIMESTAMP) || ', ')
trick
(note the extra to_clob
) makes 24 times improvement for 11g. The trick is bad for 12c where results in 1.5x degradation.
The code was published 4 year ago as an answer to "How to Quickly Append VARCHAR2 to CLOB": http://www.talkapex.com/2009/06/how-to-quickly-append-varchar2-to-clob.html?showComment=1343235921606#c9077980873875311325
OlderNewer