On Sunday, January 6, 2019 at 4:33:23 AM UTC-8, [email protected] 
wrote:
>
> Hi, I am new to ruby/sequel, work in different field: .Net, Go. I came 
> across a need to make fluentD to insert json to MSSQL to support some 
> legacy systems. Decided to write a plugin for fluent, hello Ruby…
>
> I end up make the things working but I centered everything upon 
> multi_insert logic that generates many INSERT INTO()VALUES() statements. 
>  Well, it is many thousands events/s and it is not good for DB to do it. 
> So, I need some kind of bulk operation. Ideally I would like to call a 
> scpoc on SQL side and to use table valued parameter (TVP), make the actual 
> insert at back-end engine side, jointing instead of looping. I was looking 
> the documentation for sequel and it does not look the library supports TVP 
> datatypes. Would you guys please confirm it? If not TVP then what other 
> options I have to drive a lot of data in BUKL to DB with sequel? 
>

If there is a way to do this by running in SQL query, you could just use 
Database#run to execute the SQL.

For general inserting in bulk, use Dataset#import, which is optimized on 
many databases to not require an INSERT per row.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to