Subject Re: deadlock - update conflicts with concurrent update
Author Sean
--- In firebird-support@yahoogroups.com, "Adam" <s3057043@...> wrote:
>
>
> > In my application transactions are committed right away (or roll back
> > if exception is caught) without delay.
> >
> > But there is a main table with many columns. Many of them are updated
> > by different type of transactions. For example, "UpdateCPU"
> > transaction updates "Last_CPU" field, and "UpdateMemoryUsage"
> > transaction updates "Last_memory_usage" field. Will these two
> > transactions conflict with each other when they update the same
record?
> >
> > If yes, how can I maximize the concurrency, shall I split the fields
> > into different tables?
>
> Different tables will work, although if the items are somewhat linked
> but not explicitly linked, you probably want to consider something
> more like:
>
> Attribute
> =========
>
> ID Name
> -- ----
> 1 Last_CPU
> 2 Last_Memory_Usage
>
> AttributeInformation
> ====================
>
> ID AttributeID Value
> -- ----------- ------
> 1 1 1
> 2 2 128000
>
> Two transactions can modify records 1 and 2 in AttributeInformation
> without locking each other.
>
> Adam
>

Thanks a lot! That is what I shall do!