Subject: | Re: Fitler TableFrame Records
| Date: | Sat, 7 Mar 2020 11:22:26 -0800
| From: | Peter <peterspammenot@whiteknight.email>
| Newsgroups: | pnews.paradox-programming
|
Kevin,
If you have thousands of records it is definitely worth the time to get
the setrange working. I had made a kind of scheduling app for a customer
a long time ago and it used setGenFilter(). Within a few months they
started complaining that it seemed to be getting slower and slower. I
looked at it and it definitely was. I then redid it using setRange() and
now 10 years later it is still humming along without a blink.
The challenge about setrange() is using it for multiple fields. You need
to figure out the different sorts the user is going to want and build
the secondary indexes to match.
eg.1 - 1 field
tc.setRange(field1) ;//an exact match like setgenFilter()
tc.setRange(field1_startvalue, field1_endvalue) ;//a range
eg.2 2 fields
tc.setRange(field1, field2_startvalue,field2_endValue
In this example field1 is an exact match, field2 can be a range
eg.3 3 fields
tc.setRange(field1, field2, field3_startvalue, field3_endvalue)
In this example fields 1 & 2 are exact matches, field3 is a range
tc.setRange(field1, field2, field3) ;//exact matches on three fields
like setgenfFilter()
FWIW
On 3/7/2020 2:45 AM, Kevin Baker wrote:
> Tom-
>
> Thanks for the help. I did try the setRange but for some reason, I
> can't wrap my head around how to get it to work. I've read setRange is
> faster and I'll need fast, so I may go back and try and get setRange to
> work.
>
> Thanks for the help - Kevin
|