Subject | Re: [firebird-support] RE: At my wits end |
---|---|
Author | David Johnson |
Post date | 2004-03-22T15:32:25Z |
I'll add this scenario to my test cases also. It should provide yet one more level of performance boost. It may even help the gentleman using VB that started this chain, because it would minimize the number of varaiant records he has to manipulate.
I am in the middle of writing the GDS direct test case in my allegedly spare time. Since the GDS direct model does not extend the borland Dataset model, I can't do it with a "copy/paste/tweak" so it will be a while before I get to dereferencing the params up front.
Flip side ... the assumption inherent in this is that a connection to the DBMS is always stable. If you have to drop and reconnect, then you have to ensure that all of your queries are re-prepared and all of your params are re-dereferenced (my english teacher would have a fit). It's not a problem, just a "gotcha" that has to be allowed for.
For my purposes, I am not too concerned about the up-front time. This up-front dereferencing would collapse all of those dereferences itno the setup time that my current tests deliberately do not measure.
Thanks!
I am in the middle of writing the GDS direct test case in my allegedly spare time. Since the GDS direct model does not extend the borland Dataset model, I can't do it with a "copy/paste/tweak" so it will be a while before I get to dereferencing the params up front.
Flip side ... the assumption inherent in this is that a connection to the DBMS is always stable. If you have to drop and reconnect, then you have to ensure that all of your queries are re-prepared and all of your params are re-dereferenced (my english teacher would have a fit). It's not a problem, just a "gotcha" that has to be allowed for.
For my purposes, I am not too concerned about the up-front time. This up-front dereferencing would collapse all of those dereferences itno the setup time that my current tests deliberately do not measure.
Thanks!
----- Original Message -----
From: Nando Dessena
To: firebird-support@yahoogroups.com
Sent: Sunday, March 21, 2004 10:58 AM
Subject: Re: [firebird-support] RE: At my wits end
David,
<on accessing params by index>
D> I just added this to my IBO test cases. It improves throughput by 30%.
D> The drawback is that you lose the convenience and maintainability of referencing fields "by name".
You don't have to. Once the statement is prepared the references to
the TIB_Column or TParam objects are stable. Access them by name
outside the execution loop and store each in a local variable, then
access the local variables inside the execution loop.
I never access anything by index for clearness and ease of
maintenance.
Ciao
--
Nando Dessena
mailto:nandod@...
------------------------------------------------------------------------------
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
b.. To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]