Subject | Re: [firebird-support] UPs and DOWNs after bulk inserts. |
---|---|
Author | Helen Borrie |
Post date | 2004-05-11T14:48:09Z |
At 04:28 PM 11/05/2004 +0200, you wrote:
done before leaving for Fulda...
done. Sorry, I thought you had said "50,000 deletes" before you did the
50,000 inserts.
and users start logging on again. The new stats are not read into memory
except at file open.
no preceding deletes, there is no GC needed so no transaction is getting
hit for it.
inserts. Long dup chains, esp. a high value in Max Dup compared with the
total nodes in the index.
deleting. Probably you're seeing initial imbalances from new nodes being
balanced off in the normal course of events. I'm only guessing here; but
if you eliminate GC from the picture, you're really left with unbalanced
index trees as the likely source of performance loss.
/heLen
>Hello heLen,Quick answers now, sorry, I'm racing against time here, trying to get stuff
>
done before leaving for Fulda...
> > The traditional solution is to perform SELECT * FROM THE_TABLE afterRight, for inserts it won't do any good, because there is no GC to be
>you've
> > just done a mass insert or update. Do it in a read-only read-committed
> > transaction, ideally when you have exclusive access (for efficiency, but
> > not a requirement).
>
>You mean "Select *" or "Select count(*)" ? As mentionned, I did perform a
>Select count(*) with exclusive access to take care of GC (although I don't
>see what there is to GC provided I only *inserted* records with exclusive
>access).
done. Sorry, I thought you had said "50,000 deletes" before you did the
50,000 inserts.
>I also doubled that with indices recomputes.The recomputes won't be visible until after the last user has logged off
>
>As mentionned things where worse after then.
and users start logging on again. The new stats are not read into memory
except at file open.
>However, the Select count(*) was not performed in a read-only tx as youIt should - if there was GC happening. But if you were doing inserts with
>suggest. Could that make the difference ?
no preceding deletes, there is no GC needed so no transaction is getting
hit for it.
> > This cuts out the randomness regarding whichNot if there was no GC to do.
> > transaction will get hit with the GC.
>
>So you mean that it could be that my Select count(*) didn't perform GC at
>all ?
>My SP hit the same records each time. After its first execution, shouldn'tYes, if...
>touched records be GCed and consequently, shoudn't subsequent call to the
>same SP return faster ?
> > Do SET STATS from isql after you've done other cleanup then inspect theIndexes that you suspect might have changed selectivity as a result of the
> > affected index selectivities using GSTAT.
>
>Which I did. What should I look for exactly ?
inserts. Long dup chains, esp. a high value in Max Dup compared with the
total nodes in the index.
>Before and after SET STATS, my indices all have apparently goodYou have an index on a column that stores all nulls?
>selectivities except one which is not at all (NULLs all along). Could the
>latter be a pb (index maintenance perf aside) ?
> > With inserts or deletes, it mightIndex rebuilding goes on all the time when you are inserting and
> > prove useful to set some indexes inactive/active if the operation seems
> > likely to have affected the "geometry" of indexes significantly.
>
>Ok. I'll remember that. But if it were the case in my scenario, why did my
>SP execution time finally returned back to normal (without rebuilding the
>indices) ?
deleting. Probably you're seeing initial imbalances from new nodes being
balanced off in the normal course of events. I'm only guessing here; but
if you eliminate GC from the picture, you're really left with unbalanced
index trees as the likely source of performance loss.
>Lots of questions. Sorry.Not too many answers, sorry.
/heLen
>