Subject | Re: [firebird-support] Primary key composed by multiple integer fields |
---|---|
Author | Mark Rotteveel |
Post date | 2017-11-11T12:44:12Z |
On 11-11-2017 13:15, m_brahim11@... [firebird-support] wrote:
takes more IO to locate, or add or delete entries in the index. A
primary key of a single integer takes 4 bytes (again, I'm ignoring some
implementation details), while your proposed primary key is 7 times
bigger, thus it has more overhead, and thus lower performance.
Reindexing manually (whatever that means) won't help you, because that
factor 7 difference in size remains.
Mark
--
Mark Rotteveel
>No, a larger index key (primary keys are backed by an index) means it
>
> Thanks for the answers
>
> <It depends on many details. Some operations may be affected, some not.>
> All fields contained in the PK are updated is that mean by operations
> affected ?
>
> <The decrease in performance is probably not excessive, but if the
> decrease in
> performance is acceptable or not is up to you.>
> Thanks for explanation but if case of decreasing does we need to reindex
> table manually ?
takes more IO to locate, or add or delete entries in the index. A
primary key of a single integer takes 4 bytes (again, I'm ignoring some
implementation details), while your proposed primary key is 7 times
bigger, thus it has more overhead, and thus lower performance.
Reindexing manually (whatever that means) won't help you, because that
factor 7 difference in size remains.
Mark
--
Mark Rotteveel