Hot Topic (More than 10 Replies) Relational Subtable Woes (Read 1184 times)
Blair Wettlaufer
Junior Member
Members
**
Offline


No personal text

Posts: 98
Location: Hamilton, ON
Joined: Jun 4th, 2005
Relational Subtable Woes
Nov 19th, 2005 at 2:55pm
Print Post Print Post  
Hi all,

I'm in my office this weekend, importing *everything* into Sesame, and I have a question.

I've switched my notes subtable to natural linking, and that has sped things up immeasurably.  However, the way I use my payment subtable, it has to be relational.  With it searching 110,000 payments (and growing at a rate of about 100 a day), it takes a few seconds between records -- not a huge problem, but it will cost me productivity.  However, only 1 in 10 accounts has payments.  I could flag my files as paid or not -- is there a way to turn off that subtable if there is no flag?

Thanks!


Is there a way to turn off
  

Coesper erat: tunc lubriciles altravia circum&&Urgebant gyros gimbiculosque tophi:&&Moestenui visae borogovides ire meatu:&&Et profugi gemitus exgrabuere rathae
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Relational Subtable Woes
Reply #1 - Nov 19th, 2005 at 3:00pm
Print Post Print Post  
There is a subform visibility function in SBasic. I'm not sure if that would help or not.

Why does payments have to be relational? Can a payment record appear under more than one parent record?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Blair Wettlaufer
Junior Member
Members
**
Offline


No personal text

Posts: 98
Location: Hamilton, ON
Joined: Jun 4th, 2005
Re: Relational Subtable Woes
Reply #2 - Nov 19th, 2005 at 3:04pm
Print Post Print Post  
Hi!

Here's the reason my payment has to be relational (to my foggy thinking).

1) I have a payment admin screen that tracks about 60 fields of payment data (if we've released the payment to the client, what salesman gets credit, etc.).  Payment are entered on this form.

2) I have a second form in the payment database which is 5 fields (payment here, payment dir, payment date, paymentID, and payment ref). 

That is used in a subtable of my contact management field so staff can quickly see what they've paid, and for my contact management form to calculate the balance owing.

3) In my progress to turn a relational subtable into a natural subtable, I have to import Q&A to a relational Sesame database, and then export it, and then re-import it into a natural sesame database.  If I do this with my payments, I'll lose all my data, on the payment admin form, right?

  

Coesper erat: tunc lubriciles altravia circum&&Urgebant gyros gimbiculosque tophi:&&Moestenui visae borogovides ire meatu:&&Et profugi gemitus exgrabuere rathae
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Relational Subtable Woes
Reply #3 - Nov 19th, 2005 at 3:15pm
Print Post Print Post  
Not too muddy at all.

It may be possible to re-think the design to use natural linking and use some kind of synching to avoid things falling out of normalization. But, I'm too cold at the moment for major redesign (brrrrr!) and Erika is better at that kind of stuff then me anyways.

Give the subform visibility call a try. See if it helps.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Blair Wettlaufer
Junior Member
Members
**
Offline


No personal text

Posts: 98
Location: Hamilton, ON
Joined: Jun 4th, 2005
Re: Relational Subtable Woes
Reply #4 - Nov 19th, 2005 at 3:18pm
Print Post Print Post  
Will do!

(You realize you're complaining about the cold to a Canadian, right?  Grin)
  

Coesper erat: tunc lubriciles altravia circum&&Urgebant gyros gimbiculosque tophi:&&Moestenui visae borogovides ire meatu:&&Et profugi gemitus exgrabuere rathae
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Relational Subtable Woes
Reply #5 - Nov 19th, 2005 at 3:23pm
Print Post Print Post  
Quote:
Will do!

(You realize you're complaining about the cold to a Canadian, right?  Grin)


Yup, right across the lake from me, to the northeast - a?

Haven't had time to go around and get the house ready for winter. Its about 55F in here at the moment (working from home). I just turned up the heat. But its hard to do design when your brain is frozen. I hate winter.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Blair Wettlaufer
Junior Member
Members
**
Offline


No personal text

Posts: 98
Location: Hamilton, ON
Joined: Jun 4th, 2005
Re: Relational Subtable Woes
Reply #6 - Nov 19th, 2005 at 3:31pm
Print Post Print Post  
Brrr!  That *is* cold!

You've got one of those grand old houses with a great porch, old world charm, and a huge heating bill, right?  I know the feeling ...
  

Coesper erat: tunc lubriciles altravia circum&&Urgebant gyros gimbiculosque tophi:&&Moestenui visae borogovides ire meatu:&&Et profugi gemitus exgrabuere rathae
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Relational Subtable Woes
Reply #7 - Nov 19th, 2005 at 3:35pm
Print Post Print Post  
Nope. Used to. I had an old vic. But now I have a fairly modern style house. But its all electric. So I still have the big bills.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Blair Wettlaufer
Junior Member
Members
**
Offline


No personal text

Posts: 98
Location: Hamilton, ON
Joined: Jun 4th, 2005
Re: Relational Subtable Woes
Reply #8 - Nov 19th, 2005 at 3:40pm
Print Post Print Post  
No luck, Mark.

Just reconciled with the following code on form entry:

Code
Select All
// Experiment to hide Payment Subform if there are no payments -- BW 2005-11-20

if DBPd >0 then
{
	SubFormVisibility("Pmt Data",1)
}
Else SubformVisibility("Pmt Data",0)
 



It's not sorting the invisible data anymore, but there is still a noticeable lag as it searches the payment database for available payments. 

Maybe Erika will have a suggestion after the weekend?
  

Coesper erat: tunc lubriciles altravia circum&&Urgebant gyros gimbiculosque tophi:&&Moestenui visae borogovides ire meatu:&&Et profugi gemitus exgrabuere rathae
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Relational Subtable Woes
Reply #9 - Nov 20th, 2005 at 3:43pm
Print Post Print Post  
Quote:
Maybe Erika will have a suggestion after the weekend?


Hi Blair,

What I usually recommend in cases like this is an "on-demand" approach. Rather than doing this as a subrecord, which requires Sesame to go find the matching subs even if you are just F10ing through records without actually looking at the payment data, can you put a button on your form that, when clicked, fills a multiline text box or WriteLn window with the matching payment info using @XLookupSourceListAll?

That way, you only incur the overhead of matching, sending and drawing records when the user actually asks for it, as opposed to coincidentally.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Blair Wettlaufer
Junior Member
Members
**
Offline


No personal text

Posts: 98
Location: Hamilton, ON
Joined: Jun 4th, 2005
Re: Relational Subtable Woes
Reply #10 - Nov 20th, 2005 at 5:45pm
Print Post Print Post  
I'll have to try that ...

I'm already duplicating my efforts by posting the payment information to my contact management screen when the payment happens, and the subrecord is just there to keep things accurate "on the fly". 

Thanks!
  

Coesper erat: tunc lubriciles altravia circum&&Urgebant gyros gimbiculosque tophi:&&Moestenui visae borogovides ire meatu:&&Et profugi gemitus exgrabuere rathae
Back to top
 
IP Logged