Thread: Postgres performance issue

Postgres performance issue

From
Nikhil Ingale
Date:
Hi All,

I'm seeing some performance issue that's bulk inserts are around 15 inserts per second which is very low. Do we have a performance mgmt tool in pg like AWR in oracle?

Regards,
Nikhil Ingale

Re: Postgres performance issue

From
Julien Rouhaud
Date:
Hi,

On Thu, Jun 16, 2022 at 03:13:40PM +0530, Nikhil Ingale wrote:
> 
> I'm seeing some performance issue that's bulk inserts are around 15 inserts
> per second which is very low. Do we have a performance mgmt tool in pg like
> AWR in oracle?

I don't know much about oracle or AWR, but you might be interested in
pg_stat_statements extension, or pg_wait_sampling (for wait events) and
pg_stat_kcache (for CPU/disk usage).  There are tools that can perform regular
snapshot and display some dashboard based on that, like powa.

If that's not enough or what you need, you can look at
https://wiki.postgresql.org/wiki/Slow_Query_Questions to provide needed
information and get help optimizing your inserts.



Re: Postgres performance issue

From
Bo Victor Thomsen
Date:
https://stackoverflow.com/questions/12206600/how-to-speed-up-insertion-performance-in-postgresql

And You might temporary drop the primary key when bulk loading.

Med venlig hilsen / Kind regards

Bo Victor Thomsen

Den 16-06-2022 kl. 11:43 skrev Nikhil Ingale:
> Hi All,
>
> I'm seeing some performance issue that's bulk inserts are around 15 
> inserts per second which is very low. Do we have a performance mgmt 
> tool in pg like AWR in oracle?
>
> Regards,
> Nikhil Ingale



Re: Postgres performance issue

From
Ninad Shah
Date:
You may consider using the Pgbadger tool. This tool extracts data from log files and generates a comprehensive report.

Besides, a low INSERT rate is often attributed to a number of factors.
  • A number of indexes
  • A number of foreign keys
  • A number of DB triggers
  • A number of long-running queries
  • Another processes contributing to the load
  • Disk utilisation

Hope this helps!


Thanks,
Ninad


On Fri, Jun 17, 2022 at 3:04 PM Bo Victor Thomsen <bo.victor.thomsen@gmail.com> wrote:
https://stackoverflow.com/questions/12206600/how-to-speed-up-insertion-performance-in-postgresql

And You might temporary drop the primary key when bulk loading.

Med venlig hilsen / Kind regards

Bo Victor Thomsen

Den 16-06-2022 kl. 11:43 skrev Nikhil Ingale:
> Hi All,
>
> I'm seeing some performance issue that's bulk inserts are around 15
> inserts per second which is very low. Do we have a performance mgmt
> tool in pg like AWR in oracle?
>
> Regards,
> Nikhil Ingale


Re: Postgres performance issue

From
Balamurugan Thanikachalam
Date:
Bulk inserts within a explicit transaction, improve the performance.

On Fri, 24 Jun 2022, 22:21 Ninad Shah, <ninad.shah@percona.com> wrote:
You may consider using the Pgbadger tool. This tool extracts data from log files and generates a comprehensive report.

Besides, a low INSERT rate is often attributed to a number of factors.
  • A number of indexes
  • A number of foreign keys
  • A number of DB triggers
  • A number of long-running queries
  • Another processes contributing to the load
  • Disk utilisation

Hope this helps!


Thanks,
Ninad


On Fri, Jun 17, 2022 at 3:04 PM Bo Victor Thomsen <bo.victor.thomsen@gmail.com> wrote:
https://stackoverflow.com/questions/12206600/how-to-speed-up-insertion-performance-in-postgresql

And You might temporary drop the primary key when bulk loading.

Med venlig hilsen / Kind regards

Bo Victor Thomsen

Den 16-06-2022 kl. 11:43 skrev Nikhil Ingale:
> Hi All,
>
> I'm seeing some performance issue that's bulk inserts are around 15
> inserts per second which is very low. Do we have a performance mgmt
> tool in pg like AWR in oracle?
>
> Regards,
> Nikhil Ingale