#1 2017-07-28 08:11:16

dka1
Member
From: Greece
Registered: 2017-07-25
Posts: 28

TSQLDBStatement / Binary format size

Hello,
last days studying/testing direct access through OleDB.
It is incredible fast against SDAC on select and faster on insert, update and incredible fast using batch (eg 200 rows) statements.
Also very fast binary serialization (FetchAllToBinary), the only disadvantage is data size of binary serialization when column is varchar serializer use 2bytes as of nvarchar column.
Is it possible and not big effort to change it and use actual column type on serialize/de-serialize?

Offline

#2 2017-07-28 09:39:27

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: TSQLDBStatement / Binary format size

Could you please give some more info, it is difficult to find out what you propose here?
Do you have any code patch proposal?

Offline

#3 2017-07-28 10:34:16

dka1
Member
From: Greece
Registered: 2017-07-25
Posts: 28

Re: TSQLDBStatement / Binary format size

Stream size of TSQLDBStatement.FetchAllToBinary for varchar columns is 2x more than what actually is cause of converting string to RawUTF8.
Function TOleDBStatement.BindColumns check the actual type of column (DBTYPE_STR, DBTYPE_BSTR, DBTYPE_WSTR) but use Len := Len*2.
I have not a patch because I don't check code further it is core of oledb.
Do you think fix worth's the effort?

Offline

Board footer

Powered by FluxBB