firebirdfirebird-3.0firebird-embeddedconnection-pool

Is a connection pool for Firebird embedded pointless?


I am creating an application server using firebird 3 embedded for the database. A connection pool usually speeds up things for short connections that make one transaction and disconnect. But does this also apply for embedded firebird where no authentification and no network things take place on connect?


Solution

  • Creating a connection with Firebird Embedded has a lot less overhead than creating a connection to Firebird server (especially over a non-local network connection). In that regard, using a connection pool with Firebird Embedded provides less benefits than for a networked connection.

    However, using a connection pool might still provide some benefits. For example, various caches will be retained and reused, like the metadata caches, page buffers and possibly some filesystem related caches. Whether that benefit is big enough to warrant a connection pool, I'm not sure, and I'm not aware of any benchmarks.

    This is cheaper to try and measure if you're using a language were connection pool implementations are already available compared to first having to implement it yourself. For example, for C# (.net), the Firebird ADO.net provider contains one (which is enabled by default), and for Java, there are a lot of third party connection pool libraries available.