Login Page - Create Account

Support Board


Date/Time: Tue, 28 May 2024 04:31:21 +0000



Post From: Connecting to external MySQL database server

[2021-03-15 20:24:58]
enemyspy - Posts: 304
See here:
http://otl.sourceforge.net/otl3_intro.htm

Open Source c++ library for interfacing sql. I use it with postgres in custom studies, support for mysql is better.

You can probably re-purpose the subgraph to text file study to work with it.

What I found to be fastest (a little less mem efficient):

-Open a connection pool on the heap (inside a study collection dll but outside the studies).

-Create a small module that is not part of a custom study but uses sierrachart.h along with otlv4.h and whatever else you need. This will interface your SC data to the data base.

-Pass rows to this module in batches use an upsert method if you want implemtation to be less complicated.

-You can keep track of the rows already submitted by using persistent variable row indices.

- Works best if upserts are submitted via background threads so that they are non blocking.

-Memory and cpu will limit the number of asycronous batches you can send. So You will want to want to use some kind of queue to hold upsert information.

-You will want to make sure that you are not copying the sc data and keeping it referenced instead (at least until it absolutely has to be copied like when you format and buffer it right before commit).
Date Time Of Last Edit: 2021-03-15 20:46:06