Subject | Re: [IBO] IB_QUERY, POST is taking long time, what am I doing wrong? |
---|---|
Author | Chuck Belanger |
Post date | 2004-09-02T15:09:06Z |
Thanks Helen and Jason!
Jason, I know you've mentioned multiple times the use of the SQL monitor. This
was my first time to use it and it immediately showed me what the problem was.
There would have been little chance that Helen would have caught the problem (at
least specifically).
Turns out that in the process of trashing my DB with development, I copied my
backup over the one I was using. I had in the meanwhile inactivated a trigger,
but the backup had it activated. That trigger was causing the long Posting
issue.
With SQL Monitor, I saw that this trigger was firing on the first time it poped
up during this operation in question--very neat!
Thanks again,
Chuck
Jason Wharton wrote:
Jason, I know you've mentioned multiple times the use of the SQL monitor. This
was my first time to use it and it immediately showed me what the problem was.
There would have been little chance that Helen would have caught the problem (at
least specifically).
Turns out that in the process of trashing my DB with development, I copied my
backup over the one I was using. I had in the meanwhile inactivated a trigger,
but the backup had it activated. That trigger was causing the long Posting
issue.
With SQL Monitor, I saw that this trigger was firing on the first time it poped
up during this operation in question--very neat!
Thanks again,
Chuck
Jason Wharton wrote:
> Look at the SQL Trace monitor and see if the time is spent on the server or
> in your client code.
>
> Jason Wharton
>
> -----Original Message-----
> From: Chuck Belanger [mailto:phytotech@...]
> Sent: Tuesday, August 31, 2004 3:56 PM
> To: IBObjects Listserve
> Subject: [IBO] IB_QUERY, POST is taking long time, what am I doing
> wrong?
>
> Hello:
>
> I'm doing the following query to update a node that I'm moving in a tree
> and the POST is really slow (about 5 seconds). What am I doing wrong?
>
> Thanks,
>
> Chuck Belanger
>
> Qry := TIB_Query.Create(nil);
> IB_Connection := IB_connection1;
> IB_Transaction := IB_Transaction1;
> RequestLive := true;
> with qry do
> begin
> sql.clear
> sql. add : Select ml_id, ml_path, ml_parentid, root_id from
> masterlibrary where ml_id = :id; (INDEX ON ML_ID)
> parambyname id := <id of record>;
> prepare
> open
>
> if not eof then
> begin
> edit;
> fieldbyname('ml_path').asString := < a string that looks like
> '.3814.345.567.34.' and represents ml_id for each node down the tree to
> the item>
> fieldbyname('root_id').asInteger := newrootid; (INDEX ON THIS)
> fieldbyname('ml_parentid').asInteger := newparentID; (INDEX ON THIS)
> post;
> end;
>
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more !
> Yahoo! Groups Links
>
>
>
>