Subject | Re: [IBO] Need help with Locate() (another issue). |
---|---|
Author | Dany Marmur |
Post date | 2002-11-04T23:49:49Z |
""Jason Wharton"" <jwharton@...> skrev i meddelandet
news:04c801c28458$e16b9db0$dc756a41@CX170673E...
it's about actually NOT doing anything or doing something "smaller" until at
a certain point (way into the field). Unfortunately this is not applicable
to my case. The CHAR(5) was just an example. What I need is a true composite
key lookup* and _not_ lopPartialKey. If this is the way it should work, then
I'll create a sibling SQL to do it, but this felt like a "feature" - that's
why I posted. Could I not compare the fourth locate to the previous and do
some "start-over" if it's less? I mean to ask - what do I have to do to
"reset" so that Lookup #4 won't "traverse". I "played" with the
FetchWholeRows setting (if negating it qualifies to playing :)) and it seems
a little faster over a 10 MBit line, but still unacceptable (> minutes) over
a 5 kbit line (hav'nt had time to time it - it's bedtime in Europe). Should
I try to play with TIB_LocateCursor? Or would that be gaining little
compared to a sibling Query?
As you probably understand from my example it's user input stuff going into
the function and that means I won't be able to benefit from buffer searching
at all (since this happens when there's _no_ match).
Thanks,
* I'll also be needing a less than lookup w/o row selection later on. But on
thing at a time... :)
/Dany
news:04c801c28458$e16b9db0$dc756a41@CX170673E...
> Try setting OrderingLinks with the POS attribute or you can play with theHmmm. I'm not 100% sure I understand the POS attribute, but as I gather,
> FetchWholeRows setting to see if this provides an influence.
it's about actually NOT doing anything or doing something "smaller" until at
a certain point (way into the field). Unfortunately this is not applicable
to my case. The CHAR(5) was just an example. What I need is a true composite
key lookup* and _not_ lopPartialKey. If this is the way it should work, then
I'll create a sibling SQL to do it, but this felt like a "feature" - that's
why I posted. Could I not compare the fourth locate to the previous and do
some "start-over" if it's less? I mean to ask - what do I have to do to
"reset" so that Lookup #4 won't "traverse". I "played" with the
FetchWholeRows setting (if negating it qualifies to playing :)) and it seems
a little faster over a 10 MBit line, but still unacceptable (> minutes) over
a 5 kbit line (hav'nt had time to time it - it's bedtime in Europe). Should
I try to play with TIB_LocateCursor? Or would that be gaining little
compared to a sibling Query?
As you probably understand from my example it's user input stuff going into
the function and that means I won't be able to benefit from buffer searching
at all (since this happens when there's _no_ match).
Thanks,
* I'll also be needing a less than lookup w/o row selection later on. But on
thing at a time... :)
/Dany
>In
> Jason Wharton
> CPS - Mesa AZ
> http://www.ibobjects.com
>
> -- We may not have it all together --
> -- But together we have it all --
>
>
> ----- Original Message -----
> From: "Dany Marmur" <arbit@...>
> Newsgroups: egroups.ibobjects
> To: <IBObjects@yahoogroups.com>
> Sent: Monday, November 04, 2002 2:15 PM
> Subject: [IBO] Need help with Locate() (another issue).
>
>
> > Hi again!
> >
> > This puzzles me. If anyone would take the time to answer I'd be very
> > thankful.
> >
> > I have a table with 16000 rows and a primary key containing three fields
> > CHAR(5), CHAR(2) and CHAR(2). The thing is it's a composite primary key.
> > There are only three more fields in this table (VARCHAR(20), CHAR(2) and
> > CHAR(2). I open the following query;
> >
> > object IB_Query7: TIB_Query
> > DataBase = '/opt/database/ABASE.GDB'
> > IB_Connection = IB_Connection1
> > IB_Transaction = IB_Transaction1
> > SQL.Strings = (
> > 'SELECT *'
> > 'FROM TABLE')
> > CallbackInitInt = 500
> > ColorScheme = True
> > KeyLinks.Strings = (
> > 'TEST.PK_FIELD_1'
> > 'TEST.PK_FIELD_2'
> > 'TEST.PK_FIELD_3')
> > MasterSearchFlags = [msfOpenMasterOnOpen,
> msfSearchAppliesToMasterOnly]
> > OrderingItemNo = 1
> > OrderingItems.Strings = ('PK_FIELD_1=PK_FIELD_1, PK_FIELD_2,
> > PK_FIELD_3')
> > OrderingLinks.Strings = ('PK_FIELD_1=ITEM=1')
> > RequestLive = True
> > BufferSynchroFlags = []
> > FetchWholeRows = False
> > Left = 9
> > Top = 9
> > end
> >
> > When I do this on a speedbutton click:
> >
> > IB_Query7.Locate('POSTAL_CODE;', '21', []);
> > Label1.Caption := 'First Locate';
> > Application.ProcessMessages;
> >
> > IB_Query7.Locate('POSTAL_CODE;', '214', []);
> > Label1.Caption := 'Second Locate';
> > Application.ProcessMessages;
> >
> > IB_Query7.Locate('POSTAL_CODE;', '21424', []);
> > Label1.Caption := 'Third Locate';
> > Application.ProcessMessages;
> >
> > IB_Query7.Locate('POSTAL_CODE;', '214', []);
> > Label1.Caption := 'Fourth Locate';
> > Application.ProcessMessages;
> >
> > The Fourth locate takes ages! That record is at approx. position 3800.
> > TIB_BDataset.IMP there's this row at line 1322 (4.2Ia):FetchingAborted
> >
> > BufferRowNum := ii; // Beware of fetch callbacks.
> > too.fast
> >
> > and it seems it's passed thousands of times for the fourth locate to
> > complete creating intense network activity. Why is locate 1, 2, 3 so
> > when locate 4 takes minutes to complete over a 5 kbit line? Running___________________________________________________________________________
> cpLocal,
> > though, one only notices a sligt pause,
> >
> > PK_FIELD_1 is populated with numbers and all fields are filled with 5
> digits
> > in all records. No localized characters.
> >
> > If I use LookupKeyForFields it's lightning fast but I have to supply
> values
> > for all 3 fields, and that's not suitable in the context of what I'm
> trying
> > to do. Neither do I want to filter or limit the rows in the dataset.
> >
> > Thankt a lot!
> >
> > /Dany
>
>
>
>
>
> IB Objects - direct, complete, custom connectivity to Firebird orInterBase
> without the need for BDE, ODBC or any other layer.___________________________________________________________________________
>
> http://www.ibobjects.com - your IBO community resource for Tech Infopapers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>