Subject | Re: [IBO] Slow stuff |
---|---|
Author | Jason Wharton |
Post date | 2002-06-03T23:31:15Z |
> 1) When a TTable is opened, what exactly is transferred to the client? Iknow
> that it doesn't download all of the records, but does it at least get alist of
> all the keys?Whatever records are needed to fill the buffers requested. It also depends
on the mode you use. The possible modes you have to choose from is standard
single cursor whole records mode where the buffer is monolithic and to get
the last record all records must be fetched. The second possible mode
accomplished by setting FetchWholeRows to false is you fetch all keys into
the buffer when Last is called and then only the whole records needed to
populate the buffers. The third possible mode is accomplished by having
ascending and descending indexes and an IndexFieldNames setup accordingly.
Then, IBO is able to use dual cursors so that navigating in the dataset can
be accomplished more immediately, independent of the actual size of the
dataset. When Last method is called it simply opens a cursor with descending
order and immediately fetches records from the end of the dataset. If a seek
or findkey is done on a value it used two cursors, one ascending, one
descending to fetch the records most immediate to the sought record and
finds it with minimal records fetched.
> 2) Same question as above, but for TQuery.With additional configuration, the TQuery can do all the same stuff as
above.
> 3) What does IBO do when Last() is called? I would think that it wouldjust
> fetch the desired record by doing a query by the key. If it already knowsthe
> key, it should be pretty quick to do that. If it doesn't know the key,then how
> does it get it?Read above.
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
----- Original Message -----
From: "Joe Martinez" <joe@...>
To: <IBObjects@yahoogroups.com>
Sent: Saturday, June 01, 2002 11:54 PM
Subject: Re: [IBO] Slow stuff
> Jason,
>
> Was there something specific that was done between Gc and Hc in this
regard, or
> are you just recommending that I do it in general for other reasons?
>
> I'm not sure what you mean by "the proper indexes". The dataset in
question is
> a TTable, and is not sorted in any particular order. The records are just
in
> the order that they were inserted. The table does have a primary key, and
> several other indexes on commonly-searched fields. It doesn't have any
> descending indexes, but I don't see how indexes help if the dataset is not
in
> any particular order.
>
> Perhaps the following questions will help my understanding:
>
>
> -Joe
>
> Jason Wharton wrote:
>
> > Upgrade to Hc and then make sure you have the proper indexes (descending
> > ones too).
> >
> > Jason Wharton
> > CPS - Mesa AZ
> > http://www.ibobjects.com
> >
> > ----- Original Message -----
> > From: "Joe Martinez" <joe@...>
> > To: <IBObjects@yahoogroups.com>
> > Sent: Saturday, June 01, 2002 10:30 AM
> > Subject: Re: [IBO] Slow stuff
> >
> > > I'm using 4.2 Gc.
> > >
> > > -Joe
> > >
> > > Jason Wharton wrote:
> > >
> > > > What version of IBO are you using?
> > > >
> > > > Jason Wharton
> > > > CPS - Mesa AZ
> > > > http://www.ibobjects.com
> > > >
> > > > ----- Original Message -----
> > > > From: "Joe Martinez" <joe@...>
> > > > To: "IB Objects" <IBObjects@yahoogroups.com>
> > > > Sent: Saturday, June 01, 2002 12:10 AM
> > > > Subject: [IBO] Slow stuff
> > > >
> > > > > Since porting my app from BDE to IBO (TDataset-compatable
objects), I
> > > > > have noticed some things that seem to be a lot slower than they
were
> > > > > previously under the BDE.
> > > > >
> > > > > The first is calling Last() on a dataset, when starting from the
first
> > > > > record. It's taking about 1 minute on a 13,000 row dataset. The
> > second
> > > > > is doing a SetKey() and GotoKey() operation. This is taking about
a
> > > > > minute as well. Both of these took a lot less time before.
> > > > >
> >
> >
> >
___________________________________________________________________________
> > 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 !
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
>
>
>
___________________________________________________________________________
> 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 !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>