On Fri, 08 Oct 1999 14:31:48 -0400, Leo Siefert
Quote
<lsief...@senate.state.mi.us> wrote:
>The problem exists in 4.51 as well - in fact it was first identified in
>4.51 on our network then tested and found to persist in 5.01 and 5.10.
I've done some tests with an example file Eugenio sent me. The
problem is pretty heavy: the slowdown on some queries is as big as
creating a completely new index file! The same query using other
parameter values in the WHERE-clause returns almost immediately. This
surely qualifies as a bug.
However, using exactly the same file, I couldn't reproduce the problem
with BDE 4.51. Hence, this still seems the best workaround.
Quote
>1. Return a live result set from the query - equivalent to setting a
>filter instead of returning a result set. The down-side of this
>approach is that if your result set is sparse it can be very slow to
>navigate through it.
Now I understand what you mean with a 'sparse result set'. The
problem is the same whether you have live queries or use a TTable with
a range. Only you don't notice until you skip through the result set.
At some records, skipping becomes very, very slow. When you add up
these slowdowns, you will very likely have the same net slowdown as
for non-live queries. So the problem clearly is the index itself.
Quote
>2. Remove the index. This will result in all queries being slow, but
>not as slow as the "problem' queries.
Indeed. Or make it an expression index so that local SQL won't use
it. Using an expression index didn't resolve the problem using a
TTable and SetRange though.
Quote
>3. Add an additional record or two to the database that will be included
>in the problem queries. This will solve the problem even if the added
>records are marked for deletion. This was the actual interim solution
>that I implemented while waiting for the arrival of a different database
>engine.
I've tried this, but after adding about ten records for the same key,
I gave up. I can imagine that it is actually possible to use this
workaround, but then it would only be usable when the table is pretty
'static'.
Jan