Subject Re: [firebird-support] Large DB after batch import: index rebuild/set stats, backup/restore?
Author Thomas Steinmaurer
Hi!

>> Ann W. Harrison skriver:
>>> > Also, what considerations should I make regarding page size? Maybe I
>>> > should bump up the page size?
>>>
>>> How deep are your indexes?
>
> Seems that on the largest table, they all have depth 4. Are there any
> figures in this report that would warrant a config change or anything,
> e.g. different page size?

Ann is THE person to explain the gstat output *g* ...

A golden rule for the index depth is/was not greater 3, but I guess this
was ages ago, but with the current machine power even in desktop PCs,
I'm not sure if this rule still applies or even if the index tree depth
matters anyway.

Don't know if you have mentioned your used page size somewhere, but I
would go with 8K. Increasing the page size *might* also lead to a more
flatten index tree, but a depth of 4 might be still possible. 16K is the
maximum page size.

Changing the page size on an existing database is done by running a
backup/restore cycle, providing the new page size at restore time. But
you probably know that.

I also think that using non-Ansi characters in object names isn't a good
idea for the long-term. There might be tools out there, which have
problems with that.




--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
http://www.upscene.com
My blog:
http://blog.upscene.com/thomas/



> Analyzing database pages ...
> Uppgift (567)
>
> Index IX_PK_Uppgift (0)
> Depth: 4, leaf buckets: 588728, nodes: 131418408
> Average data length: 5.08, total dup: 0, max dup: 0
> Fill distribution:
> 0 - 19% = 2968
> 20 - 39% = 15
> 40 - 59% = 279494
> 60 - 79% = 185021
> 80 - 99% = 121230
>
> Index IX_Uppgift_BorttagsuppA5K (8)
> Depth: 4, leaf buckets: 253733, nodes: 136466214
> Average data length: 0.00, total dup: 136444473, max dup: 119722141
> Fill distribution:
> 0 - 19% = 127
> 20 - 39% = 7685
> 40 - 59% = 131314
> 60 - 79% = 28000
> 80 - 99% = 86607
>
> Index IX_Uppgift_F├Ârr├Ñdsv├ñrde (7)
> Depth: 4, leaf buckets: 293233, nodes: 131520245
> Average data length: 0.01, total dup: 131518324, max dup: 92132562
> Fill distribution:
> 0 - 19% = 4
> 20 - 39% = 9
> 40 - 59% = 278194
> 60 - 79% = 10899
> 80 - 99% = 4127
>
> Index IX_Uppgift_Hållare (4)
> Depth: 4, leaf buckets: 547077, nodes: 131649325
> Average data length: 4.43, total dup: 17045909, max dup: 127020
> Fill distribution:
> 0 - 19% = 3121
> 20 - 39% = 2
> 40 - 59% = 157508
> 60 - 79% = 276535
> 80 - 99% = 109911
>
> Index IX_Uppgift_Länkobjekt (5)
> Depth: 4, leaf buckets: 171915, nodes: 131726120
> Average data length: 0.00, total dup: 131726119, max dup: 131726119
> Fill distribution:
> 0 - 19% = 13
> 20 - 39% = 0
> 40 - 59% = 16321
> 60 - 79% = 8550
> 80 - 99% = 147031
>
> Index IX_Uppgift_RelateradHåIS0 (6)
> Depth: 4, leaf buckets: 280149, nodes: 131766586
> Average data length: 0.05, total dup: 130480063, max dup: 130452477
> Fill distribution:
> 0 - 19% = 9
> 20 - 39% = 1
> 40 - 59% = 262222
> 60 - 79% = 14551
> 80 - 99% = 3366
>
> Index IX_Uppgift_TilläggsuppYNC (9)
> Depth: 4, leaf buckets: 196830, nodes: 131804550
> Average data length: 0.02, total dup: 131766961, max dup: 11251
> Fill distribution:
> 0 - 19% = 9
> 20 - 39% = 1
> 40 - 59% = 3217
> 60 - 79% = 44
> 80 - 99% = 193559
>
> Index IX_Uppgift_Uppgiftsägare (2)
> Depth: 4, leaf buckets: 189653, nodes: 131832678
> Average data length: 0.00, total dup: 131832676, max dup: 131822466
> Fill distribution:
> 0 - 19% = 9
> 20 - 39% = 1
> 40 - 59% = 57958
> 60 - 79% = 8641
> 80 - 99% = 123044
>
>
> Regards,
> Kjell