Re: Equivalent of Get Next Extended to retrieve only unique keys?
- From: "Bill Bach" <goldstar@xxxxxxxxxxxxx>
- Date: Mon, 26 Mar 2007 20:35:19 -0500
Do you actually need the entire record, or can you get away with just
the Key Value? The usual way to implement what you are trying is to
use GetGreater calls repeated as frequently as needed. A GetGreater
with a GetKey Bias (+50) would give you just the key values, but
probably won't save you much in the way of round trip requests (though
it will save on the data transfer).
I cannot think of any way to do a "GG" on the GetNextExtended, though.
By its very nature, it is a GetNext function. If your level of
duplication is low, then perhaps you can do a regular GNE and filter
out the extra records. If you get TOO many duplicates in a row, you
can then do a GetGreater to skip the rest of the duplicates. The
code'll be ugly, to be sure...
Might be better off doing a simply SQL query:
SELECT DISTINCT(...) FROM ...
But you won't get Btrieve record positions from that type of query.
Goldstar Software Inc.
Pervasive-based Products, Training & Services
Bill Bach
BillBach@xxxxxxxxxxxxxxxxxxxx
http://www.goldstarsoftware.com
*** Chicago: Pervasive Service & Support Class - 07/2007 ***
Jason Gilbert wrote:
I'm writing a program that uses a Get Next Extended to pre-load
position information about records in a fairly-large database by
loading x number of records at a time. This works pretty well
performance-wise, except that I only want to retrieve unique keys
instead of every record. The filters on Get Next Extended can filter
on static values or on values within the record, but I don't see a
way to be able to filter on something like "greater than previous
record retrieved" or something like that. The alternative of looping
through the keys one at a time seems like it would be too slow.
Can anybody think of a way to achieve something like this?
.
- Follow-Ups:
- Re: Equivalent of Get Next Extended to retrieve only unique keys?
- From: Jason Gilbert
- Re: Equivalent of Get Next Extended to retrieve only unique keys?
- References:
- Equivalent of Get Next Extended to retrieve only unique keys?
- From: Jason Gilbert
- Equivalent of Get Next Extended to retrieve only unique keys?
- Prev by Date: Equivalent of Get Next Extended to retrieve only unique keys?
- Next by Date: Re: Equivalent of Get Next Extended to retrieve only unique keys?
- Previous by thread: Equivalent of Get Next Extended to retrieve only unique keys?
- Next by thread: Re: Equivalent of Get Next Extended to retrieve only unique keys?
- Index(es):
Relevant Pages
|
|