From: | Richard Brockie <richard(dot)brockie(at)gmail(dot)com> |
---|---|
To: | Erik Wienhold <ewie(at)ewie(dot)name> |
Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Slow down dev database transactions/second for testing? |
Date: | 2023-02-06 03:58:41 |
Message-ID: | CAKv-vOUsaGNJ3JTrYaA2H4Rm9DrHU8BefET7CRX_+1i=XRNQig@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sun, Feb 5, 2023 at 3:05 PM Erik Wienhold <ewie(at)ewie(dot)name> wrote:
> > On 05/02/2023 23:17 CET Richard Brockie <richard(dot)brockie(at)gmail(dot)com>
> wrote:
> >
> > I maintain a Django webapp that uses postgresql and can create
> inefficient
> > queries if I'm not careful. I'm looking for ways to mimic a congested db
> > server in development to expose these queries.
>
> pgbench is what your looking for:
> https://www.postgresql.org/docs/current/pgbench.html
>
> You can run custom statements with the --file option. Get the statements
> that
> Django generates and let pgbench run those to analyze the bottlenecks. Or
> let
> pgbench create load for some time (see option --time) while you debug your
> Django app.
>
Great - thanks for the suggestion.
> > The configuration of postgresql is complicated - is there a simple
> method by
> > which I could, for example limit the number of transactions/second to a
> > certain level by adjusting postgresql.conf?
>
> No. Postgres will execute as fast as possible with the available
> resources.
>
Understood - thanks again!
--
R.
Richard Brockie
Real-time bicycle race management - www.ontheday.net
From | Date | Subject | |
---|---|---|---|
Next Message | Ajin Cherian | 2023-02-06 07:07:40 | Re: Support logical replication of DDLs |
Previous Message | Tom Lane | 2023-02-06 01:30:25 | Re: Question regarding UTF-8 data and "C" collation on definition of field of table |