Subject | Re: [firebird-support] Re: Database randomly growing is size??? |
---|---|
Author | Ann Harrison |
Post date | 2011-02-28T17:09:42Z |
On Sun, Feb 27, 2011 at 6:24 PM, Tim Wilson <timwilsonaus@...>wrote:
three of which have
different values for LastName. One has the same value for each LastName.
That explains why
there are many more entries for the secondary indexes than for the primary.
Particularly if
you did that sequence of actions several times. If there's an overlapping
transaction that inhibits
garbage collection, you'll see something like what you describe.
Is it possible to do all the updates in a single pass, or at least in a
single transaction?
Good luck,
Ann
[Non-text portions of this message have been removed]
> We have managed to narrow down the growing of the database/indexes to theOK, I was having a bad day. You've got four copies of each client record,
> following scripts:
>
> Update Clients
> Set EntityName = RTRIM(LastName),
> FirstNames = '', LastName = ''
> where IsIndividual = 'N';
> Commit;
>
> Update Clients
> Set EntityName = RTRIM(LastName) || ', ' || COALESCE(FirstNames, '')
> where IsIndividual = 'Y';
> Commit;
>
> Update Clients
> Set Firstnames = Fname, Lastname = Lname
> Where isindividual = 'N';
> Commit;
>
>
> Is there anything in that can cause the duplicate indexes to rise so
> dramatically?
>
>
three of which have
different values for LastName. One has the same value for each LastName.
That explains why
there are many more entries for the secondary indexes than for the primary.
Particularly if
you did that sequence of actions several times. If there's an overlapping
transaction that inhibits
garbage collection, you'll see something like what you describe.
Is it possible to do all the updates in a single pass, or at least in a
single transaction?
Good luck,
Ann
[Non-text portions of this message have been removed]