NetTalk Central

Author Topic: Slow child data display  (Read 2773 times)

willieb

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
    • Email
Slow child data display
« on: August 18, 2013, 10:03:51 PM »
If anyone can help ...

I have a slight problem with a child (TPS) table with 425000 records taking a long time to display(35 seconds).  On the exe it display instantaneously but the webapp takes a loooong time.

I attached 2 screenshots:
  1  =  debugview showing the filter and the time it takes before the window open(about 35 seconds)
  2  =  child relationship setup on the nettalk template in clarion

I assume nettalk is using a filter instead of the key.  If it is the problem, what must I change/check to ensure it is using the key to speed up the child display?

I appreciate any help!! Thanks

[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: Slow child data display
« Reply #1 on: August 18, 2013, 10:11:57 PM »
Hi Willie,

All browses use a filter, even Clarion windows ones. You can't actually specify a key for a browse - not for Clarion, and not for NetTalk (despite what the templates would lead you to believe.)

But you're right - the TPS needs a key to match the order/filter you are using.
I presume AccNo is a string?

I recommend a key on the table, set as case insensitive, on
AddNo, -Date, -Time, AN

Cheers
Bruce




willieb

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
    • Email
Re: Slow child data display
« Reply #2 on: August 18, 2013, 10:30:00 PM »
The key I am currently using have the following fields "AccNo,-Date,-Time" in the key, sure it is fine.  Any reason to add the AN?

If not a simple question ... just curious what difference will the "case sensitive" make?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: Slow child data display
« Reply #3 on: August 18, 2013, 10:45:32 PM »
>> The key I am currently using

this is an important point - a crucial step to understanding - so forgive me for harping on this. I'll confine myself here to now NetTalk works. (Clarion windows works the same way, but it may help you to understand if you consider them to work differently.)

a) The "unique key" you assign to the browse has nothing to do with the sort order. It is the key used to _identify_ rows, not sort them. Ideally this is your Primary key.

b) The sort order is determined by the settings on the "Sort" tab, both for the browse overall, and the Sort tab for the default sort field.

>> Any reason to add the AN?
the browse Order is using it, so adding it to the key makes the browse go faster.

>> just curious what difference will the "case sensitive" make?

a Case Sensitive key cannot be used by a case-insensitive Filter, and vice versa. The browse still works but since it can't use the key it will have to do a Table-Scan (ie read all the records in the table) which is slow. You can change the browse to match, or add a key to match, but they need to match for the one to use the other.

cheers
Bruce


willieb

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
    • Email
Re: Slow child data display
« Reply #4 on: August 19, 2013, 06:38:18 AM »
Bruce, thanks for the reply ... I think I know where might be my problem.

My primary key is just the AutoNumber, its specified on the first tab on the template.  On the file, I "use" the "AccDateTime" key just for the sort order.

What key is NetTalk using for the filter?  1.Primary on file,  2.Primary on Nettalk template specified(first tab),  3.the key specified on the data/table(for sorting)

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: Slow child data display
« Reply #5 on: August 19, 2013, 08:36:52 PM »
Hi Willie,

>> What key is NetTalk using for the filter?  1.Primary on file,  2.Primary on Nettalk template specified(first tab),  3.the key specified on the data/table(for sorting)

None of the above. Because NetTalk does not use keys (not directly.) Neither incidentaly does your Clarion browse. Not directly.

All Clarion browses (windows and NetTalk) use the VIEW structure to fetch data. There is no way to specify the key to a VIEW structure. The VIEW engine looks at the Prop:Order and Prop:Filter and uses whatever keys are available, any way it likes. There is no way to determine what, if any key, the VIEW engine used.

Thus it is important to visually inspect the Prop:Order and Prop:Filter and make sure that there is indeed a key in the table that the VIEW engine can use.

Unfortunately you need to let go of the idea that Browses use Keys. Until you understand that the rest of this thread is not going to work for you.

cheers
Bruce
« Last Edit: August 19, 2013, 08:40:50 PM by Bruce »

willieb

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
    • Email
Re: Slow child data display
« Reply #6 on: August 19, 2013, 09:49:44 PM »
Bruce ... my mistake!

Reading everything again, I see that I did not read your first post properly ....

I added the key(Acc,Date,Time,AN) and the browse now display in about 20seconds, half of what it previously was.

Is there anything more to speed up the display of the browse?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: Slow child data display
« Reply #7 on: August 19, 2013, 11:30:23 PM »
Hi Willie,

>> I added the key(Acc,Date,Time,AN)

did you set the date and time fields in this key to be descending?


the next step is to zip it for me and send it to me. (Yeah, I know it'll be big, but my email can cope.)
Then I can experiment here.
It's hard to debug without being able to see what you're doing.



cheers
Bruce

willieb

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
    • Email
Re: Slow child data display
« Reply #8 on: August 19, 2013, 11:39:04 PM »
Thanks, key is Acc,-Date,Time,AN.

Will send you a mail

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: Slow child data display
« Reply #9 on: August 20, 2013, 12:23:44 AM »
given that your filter is -Time, I recommend setting the key to AddNo, -Date, -Time, AN as originally suggested.

Cheers
Bruce

willieb

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
    • Email
Re: Slow child data display
« Reply #10 on: August 20, 2013, 12:44:26 AM »
Bruce, sent you the mail.

That was a typing error , the key is Acc,-Date,-Time,AN