NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: RichBowman on March 08, 2012, 12:06:27 PM

Title: Browse Filter Problem
Post by: RichBowman on March 08, 2012, 12:06:27 PM
I have parent / child Browses on a memory form. The Customer is selected from a dropdown before the Browses. Using the customer number, a very simple filter is constructed:

[3552] [netTrace][thread=3] Invoice Header Filter= SHH:CustomerNumber = 'GIF-010'

SHH:CustomerNumber is the high order field in the key. It is case sensitive. There are 4 fields in the key. The second is sorted descending. The Browse takes a looooonnnnng time to display. The file is a little over 900 MB.

I have another form with a parent / child browse against 2 other files. Almost the same format. The Customer number here is also case sensitive. It displays very fast.The file is about 11 MB. It's filter is:

[3552] [netTrace][thread=3] Order Header Filter= OEH:CustomerNumber = 'GIF-010' AND OEH:DeliveryCode <> 'BK' AND INSTRING(OEH:TransCode,'ORDRET',1,1)

I don't understand why the first is very slow and the second is fast. Any ideas? What can I look for?

Thank you,

Rich
Title: Re: Browse Filter Problem
Post by: Bruce on March 10, 2012, 04:31:06 AM
tps or sql?
Title: Re: Browse Filter Problem
Post by: RichBowman on March 10, 2012, 11:52:32 AM
Sorry, I should have mentioned it in my post. It's Btrieve. The keys in both files are case sensitive. The key in the file that is causing trouble has the second element sorted descending.

I suppose I could change the keys so they are not case sensitive. Will that make a significant difference?

Thank you,

Rich
Title: Re: Browse Filter Problem
Post by: Bruce on March 12, 2012, 02:20:49 AM
unfortunately Rich, I'm not much of a Btrieve expert, so I don't know.

I'm guessing the descending element though is the root cause.
Have you tried sending the Filter to debugview so you can see what the actual generated filter looks like?

cheers
Bruce