Subject TIB_Query.Prepare vs. TIBOQuery.Prepare
Author scyre9
Good day to all of you!

I'd like to prepare (and open) the folowing query:

select
table.*
from table
where table.id = :id

(Of course, there's a primary key on field "table.id".)

What I'd like to know is: why does it take a TIB_Query component about 70 ticks to prepare the statement, whereas a TIBOQuery needs almost 1200 ticks (!) to prepare the very same statement? I did not mess around with any properties, just dropped the components on the form.

As far as I understand it, the TIBOQuery creates an internal dataset, which is a descendant of TIB_BDataSet - just like the TIB_Query. Both seem to prepare three seperate statements, the one in the sql text plus two versions w/o the where clause. Still there's such a significant difference in execution time of the two "Prepare" methods.

Why is that the case, and what can I do about it?


Thanking you very much in advance,
Thomas