I noticed a bit of a performance regression in embedded sql queries when
moving from the client libraries in verison 8.2.4 to 8.3.7. My
application does a whole lot of queries, many of which don't return any
data. When we moved to the new libraries the time of running a query
(from the application point of view) went from about 550 usec to 800
usec. In both cases this was against a server running 8.3.7.
I turned on log_statement_stats and noticed that the behaviour is
slightly different, and the 8.3.7 version sends the statement to the
server twice, while 8.2.4 only sends it once.
const char *SQL_text = "select * from foo"; (not always the same
query)
exec sql prepare s_1ab from :SQL_text; <---- [*1]
exec sql declare c_1ab cursor for s_1ab;
exec sql open c_1ab; <---- [*2]
At [*1], with the 8.3.7 libraries, I see in the server log:
STATEMENT: select * from foo
With 8.2.4, nothing is logged. Both versions send the statement to
declare the cursor:
STATEMENT: declare c_1ab cursor for select * from foo
Suggestions?
eric