>    I don't know if IB's "Change View" really useful feature. Do you have some 
> expirience\opinon?
> 
> Regards,
> Vlad

Sadly, no. 
We have had too many problems with Interbase stability and the worst ever seen 
paid support (Fortunately, Delphi support works well),
that we have not tried to add another layer to have more problems. Because of 
that, we do not tested this feature enough to say something usefull.
Because of this bad support, we have spend half of the year to migrate to 
Firebird and all problems disappear :)

but from below scenario you can bring the idea

usage case:
1.
  TR1 insert and update data on TableX and is still active

2.   
  Application do
  TR2 start and we get recentCN and remember it as interestingCN
  and we do
  SELECT * FROM TABLEX
  and cache above data in some memory dataset
  TR2 commit

3.
  TR1 commit and some other transactions commited.

4.
  e.g. TR55 start and we get recentCN and remember it 
  and we got only "delta"
  SELECT * FROM TABLEX WHERE CN>interestingCN
  and we merge (which is really simple) this dataset with previously cached 
dataset
  now we remember current CN as interesting
  interestingCN:=recentCN
  TR55 commit


and we repeat point 4 e.g. by every 5 minutes to got only deltas
with only above scenario (without deletes) this is already really usefull thing.

And why i was talking about storing pair of TransactionID which was commited 
with its commit number?
Because record versions store Transaction id not CN and to make above query  
"WHERE CN>interestingCN" possible - engine must know how pair trID and its CN.


To have this scenario fully supported we need to look at problem with deleted 
records info, this require some new feature.
This can be implemented in Firebird in many ways. You know many internals and 
you can do this better than i can imagine.
But below my concept (probably bad or hard to understand, as i am not native 
English speaker)

E.g. i can imagine some idea like this"
Firebird can introduce  

GetRecentCN(NAME, param_INTERESTING_CN) (at start user can call this with NULL 
as param_INTERESTING_CN)
this can work as permanent snapshot transaction until connection end

if user do GetRecentCN(USER_KEY, param_INTERESTING_CN + X) this can progress 
transaction number (permanent snapshot id) and garbage collector and consume 
old record versions as always do
of course another user also can be interesting to "permanent snapshot" and this 
last interesting numbers should be tracked by the engine.

regards,
Karol Bieniaszewski




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to