Subject Re: SELECT ONLY database query performance
Author Adam
--- In, Tetram Corp <dev@...> wrote:
> Others will correct me if i'm wrong but afaik, fbclient and fbembed are
> not thread safe, so applications must use critical sections to
access data
> so, it's your application itself which block threads to read data

A connection is not threadsafe. That means if two threads want to
utilise the same connection object, you need to serialise the calls.
However embedded is 'nothing special', it is really Superserver under
there. As such, you can connect to it multiple times (from within a
single application only obviously).

The OP states that they are explicitly creating a connection for each
thread, which should be OK. Failing to get that right is more likely
to give you access violations rather than slowness, so I would be
focusing elsewhere.

To the OP, the obvious question has to be asked, is the hardware
actually good enough to allow it to serve 200 connections? There may
be a lot of hard drive 'thrashing' going on.