Re: Running concurrent txns and measuring the timings in Postgres

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: Souvik Bhattacherjee <kivuosb(at)gmail(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Running concurrent txns and measuring the timings in Postgres
Date: 2019-07-24 19:53:22
Message-ID: 9FDB31EE-CEC5-4B19-B311-E96AC7139706@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> On Jul 24, 2019, at 1:22 PM, Souvik Bhattacherjee <kivuosb(at)gmail(dot)com> wrote:
>
> > It would help to know what problem you are trying to solve?
>
> Multiple txns are inserting tuples into a table concurrently. Wanted to measure
> the total time taken to complete the insertion process. Some txns overlap with
> others on the tuples they insert. Duplicate tuples are not inserted.
> --
> adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>
Start both/all clients at approximately the same time, each firing a transaction at some believable interval. (Or separate threads with separate db connections.) This should generate the concurrency load I think you’re looking for. You can easily time the iteration; actual details on server side would likely involve turning on maximum logging, with client identifier, and analyzing the logs.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2019-07-24 20:12:29 Re: Running concurrent txns and measuring the timings in Postgres
Previous Message Jatinder Sandhu 2019-07-24 19:31:02 Re: partition table slow planning