Skip to content

thank you #16

@MichalPP

Description

@MichalPP

thank you for a wonderful service. I did not realize how much faster my PHP website is using PgBouncer (compared to connecting to PostgreSQL directly) (I had to turn PgBouncer off for a while). here are some graphs showing how load on PostgreSQL decreased after turning pgbouncer on (I am logging only queries longer than 4ms, graphs using PgBadger):

Image Image

and a proposal for a new FAQ entry:

Why should a PHP website use PgBouncer instead of direct PostgreSQL connection:

  • each direct PostgreSQL connection creates a new process which costs a lot of resources. In case of a standard PHP website, each website visit will create new PostgreSQL process. PgBouncer creates only one PostgreSQL connection, which can be used by many website users.
  • PostgreSQL plans are created within each process which means that when connected to PostgreSQL directly, each website user has to create the plan before accessing the data. When using PbBouncer, plans from previous website visitors are used by later ones which drastically reduces planning time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions