[fpc-pascal] SqlDB connection speed to Firebird vs PostgreSQL

Michael Van Canneyt michael at freepascal.org
Fri Aug 7 11:03:47 CEST 2009



On Fri, 7 Aug 2009, Graeme Geldenhuys wrote:

> Hi,
>
> I'm using SqlDB (via tiOPF framework) in our applications. Our software has a 
> lot of db and non-db unit tests.
>
> When I run a section of our db unit tests via SqlDB + Firebird, they complete 
> in about 6-7 seconds. When I run that exact same set of db unit tests via 
> SqlDB + PostgreSQL, they take about 70-90 seconds to complete!
>
> Why is the connection to PostgreSQL so VERY slow?  Is it the SqlDB+PostgreSQL 
> components or is it something I need to tune in the PostgreSQL config 
> settings?

Most likely the SqlDB+PostgreSQL components.

>
> Sorry if this is a dumb question, by knowledge of PostgreSQL is very limited 
> (a week to be exact).

My guess is that for each separate transaction component, a new connection is set up.
So if you create/free a lot of transaction components, this could be the cause.
Instead, try to use 1 transaction component which you commit/commitretaining/rollback.

Michael.



More information about the fpc-pascal mailing list