NetTalk Central

Author Topic: Browse Filter Problem  (Read 3820 times)

RichBowman

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • Email
Browse Filter Problem
« 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Browse Filter Problem
« Reply #1 on: March 10, 2012, 04:31:06 AM »
tps or sql?

RichBowman

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • Email
Re: Browse Filter Problem
« Reply #2 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Browse Filter Problem
« Reply #3 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