Subject | Re: [firebird-support] Re: SELECT ONLY database query performance |
---|---|
Author | Vlad Horsun |
Post date | 2007-02-26T23:13:19Z |
> Hello Vlad,Of course yes.
>
> > Exactly what i wrote. You must not have more than one thread
> calling
> > isc_attach_database (or TIBDatabase.Open if you use IBX for example)
> > simultaneously. Reread my message again ;)
>
> Is this also true if you have a separate instance of a TIBDatabase (or
> equivalent) per thread?
There are only two very simple requirements (known to me) :
a) you must not perform more than one isc_attach_database call
simultaneously (from different threads)
b) you must not perform more than one operation one the same
attachment simultaneously
Simplest (but not only) way to satisfy this requirements is to serialize
isc_attach_database calls with critical section (or mutex) and operate
one the some attachment within the single thread
> If so, what is the scope (system-wide mutex) or is an application wideApplication wide. It is related with some inner details of client library
> critical section sufficient.
I not quite sure that attach synchronization is required for _embedded_
but it can't hurt performance if your application make something else
except of connect\disconnect ;)
Regards,
Vlad