Skip to content

Instantly share code, notes, and snippets.

View jmptrader's full-sized avatar
🏠
Working from home

Jorge Martínez Treasuris-ADITIVA. jmptrader

🏠
Working from home
View GitHub Profile
@jmptrader
jmptrader / go-oci8 on win64.md
Created March 27, 2022 22:59 — forked from mnadel/go-oci8 on win64.md
go-oci8 on windows64
@jmptrader
jmptrader / csvfile.h
Created May 1, 2022 15:34 — forked from rudolfovich/csvfile.h
CSV file generator
#pragma once
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
class csvfile;
inline static csvfile& endrow(csvfile& file);
inline static csvfile& flush(csvfile& file);
@jmptrader
jmptrader / 00_conclusions.md
Created September 18, 2025 23:22 — forked from vlsi/00_conclusions.md
The fastest way of string concatenation in Oracle PL/SQL

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