Hi all.
I have been struggling with speed issues with my CodeBase queries for a
while. I hope somebody will be able to help! Here are the two problems
I am facing using the current version of CodeBase with Delphi:
1. The first call of relate4Top is occasionally/usually very slow
(sometimes its speed is ok). On a query covering a couple of tables
with the master table comprising about 20,000 records the first call
can take up to 35 seconds while future calls are completed in about 2
seconds. I am applying both query and memory optimization, tried
sorting with relate4Sort and through the master table's index, but do
not get the first call of relate4Top to speed up.
2. After calling relate4Top, I skip through the table to count the
total number of records in the query set and the number of records that
meet a specific criterion (that is why I do not use relate4Count). The
problem is that when I use relate4SortSet, relate4Top is slow and
skipping is fast; however, when I use the master table's index instead
the query is created a lot faster but the skipping slows down
significantly, so that I end up with about the same overall time to
generate the query and count the composite records. Now, obviously, I
would like to combine the speed of relate4Top with the index and the
skipping with relate4SortSet.
I found a posting (from 2002) that referred to "relate->set.numFlags"
and "relate->set.flags" (supposedly undo***ented functions) to speed
the whole thing up, but I can't find them.
Can anybody please give me a hint as to how I can improve performance?
I am seriously considering changing to another database engine but
would like to avoid that.
Thank you so much!
Markus


|