Subject | RE: [IBO] Query 3 times slower in 5.9 as compared with 4.21 |
---|---|
Author | IBO Support List |
Post date | 2017-04-06T01:08:37Z |
Ed,
There isn’t anything to fix where
TIB_Cursor is concerned.
When a component is inherently unidirectional it changes the behavior of
things.
Calling TIB_Cursor.Open merely opens the dataset cursor for fetching, but it doesn’t do a fetch so it starts at BOF.
If you call the First method it will always close, if open, then reopen and fetch the first record for you.
I realize this is different than how a buffered query works but I want each to work appropriately for what they specialize in.
Hope this made sense.
Jason Wharton
www.ibobjects.com
From:
IBObjects@yahoogroups.com [mailto:
IBObjects@yahoogroups.com ]
Sent: Wednesday, April 05, 2017
3:17 PM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] Query 3 times
slower in 5.9 as compared with 4.21
>I remember Jason many years ago saying that with IB_Cursors, you should call "First" and not "Open".
> He also said that once a cursor reach eof it is closed, so closing a cursor that has eof = true isn't
> necessary. Queries on the other hand, can move forwards and backwards, should use "Open" and
> ought to be explicitly closed. Do you still get the same result if you change your IB_Cursor to using
> "First" and not "Open"?
I recall that as well, but why hasn't that been fixed? There are two ways I can see doing this in an OO soltuion:
1) the Open call could be virtual a the TIB_Dataset level, and override it with the cursor and the TIB_Cursor call First
2) Don't expose open to the public for the TIB_Dataset and therefore TIB_Cursor objects could not call .Open.
Jason?