Fine Tuning
Ed Kleban
Ed at Kleban.com
Fri Nov 18 00:41:51 CST 2005
Howdy Ruslan,
I've been fine tuning my schema and think I may have found a performance
issue I hadn't considered before.
Since every column is stored as a separate table, I started trying to
combine some of the fields in parallel side tables into my main one.
Messier on the page, but has the benefit of direct access indexing rather
than the overhead of a binary search when you need access to those fields.
Then I realized, "Doh!" Every time I do...
"aTable.recID = aRecordNumberOfInterest"
...Valentina is going to lookup and load the value of every one of those
columns for me to access, whether I need them or not. Right?
Double Doh! So then I went the opposite direction and pulled out every
single column I didn't expect to need upon virtually every access into a
separate parallel table for occasional access at the cost of a binary
search.
Better.
But now I perceive another opportunity that we never discussed. Yet
another efficiency tradeoff that may well be the decisive argument in your
favor for binary links. If the relation is in a binary link rather than a
table field, I don't incur the overhead of pre-loading that link value every
time I make a record current whether or not I need to use that link. If the
info is in a binary link instead, it doesn't even get looked at unless I
really need it.
That correct?
More information about the Valentina
mailing list