Hi Tony,
First of all Thank You! for your IBX work and support.
1) Ok. Now I see the Breaks is evil for general use. But fit my needs.
(Only use IBSQL for INSERT and UPDATE with unique parameter names.)
2) My app convert text log files to a database. With oirginal 1.0.5 the speed is 671 parsed log entry/sec. After changed "FParent.FNames" only(, without Breaks and ParamByNameEx) the speed is 764 ple/sec (~13 percent more performance than original).
3) Prepare is not my idea. With ParamByName the next chain is executed and TIBSQL.GetSQLParams contains the Prepare:
TIBSQL.ParamByName -> TIBSQL.GetSQLParams -> TIBXSQLDA.ByName -> TIBXSQLDA.GetXSQLVARByName -> TIBXSQLDA.GetXSQLVAR -> TIBXSQLVAR.SetAsVariant
4) I switched from UIB and want more speed because IBX's INSERT performance with IBSQL is very low for me.
671 ple/sec with original 1.0.5, 902 ple/sec with all my modifications, and 1038 ple/sec with UIB.
I don't understand why IBX is so slow.
5)Other things.
What do you think about varWord, varShortInt and varInt64 in TIBXSQLVAR.SetAsVariant? Without them cannot set parameter value from Word, Byte and Int64 variable.
In TIBQuery.SetParams ftLargeInt is commented out. Without it cannot set parameter value from Int64 variable.
The automatically retry thing is evil in TIBSQL.ExecQuery ("Sometimes a prepared stored procedure appears to get off sync...").
Because if an INSERT INTO RETURNING contains a NEXT VALUE FOR and a UNIQUE or other constraint fired the generator value stepped twice.
Replace
if (fetch_res <> 0) and (fetch_res <> isc_deadlock) then
begin
{ Sometimes a prepared stored procedure appears to get
off sync on the server ....This code is meant to try
to work around the problem simply by "retrying". This
need to be reproduced and fixed.
}
isc_dsql_prepare(StatusVector, TRHandle, @FHandle, 0,
PChar(FProcessedSQL.Text), 1, nil);
Call(isc_dsql_execute2(StatusVector,
TRHandle,
@FHandle,
Database.SQLDialect,
FSQLParams.AsXSQLDA,
FSQLRecord.AsXSQLDA), True);
end;
with
if (fetch_res <> 0) then IBDataBaseError;
works for me.
You started the work with original sources? If yes why not with 4.62 from SourceForge?
Gabor