Stored Procedure Performance

From: Purav Chovatia <puravc(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Stored Procedure Performance
Date: 2017-10-03 14:33:16
Message-ID: CADrzpjHChC6q0NGMG0wZUFvj-A0QO3WL9JONLcmRRCZuPnQQNQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hello,

I come from Oracle world and we are porting all our applications to
postgresql.

The application calls 2 stored procs,
- first one does a few selects and then an insert
- second one does an update

The main table on which the insert and the update happens is truncated
before every performance test.

We are doing about 100 executions of both of these stored proc per second.

In Oracle each exec takes about 1millisec whereas in postgres its taking
10millisec and that eventually leads to a queue build up in our application.

All indices are in place. The select, insert & update are all single row
operations and use the PK.

It does not look like any query taking longer but something else. How can I
check where is the time being spent? There are no IO waits, so its all on
the CPU.

btw, postgres and oracle both are installed on the same server, so no
differences in env.

All suggestions welcome but I am more of looking at tools or any profilers
that I can use to find out where is the time being spent because we believe
most of our applications will run into similar issues.

The version is 9.6 on RHEL 7.2.

Many thanks in advance.

Regards,
Purav

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Laurenz Albe 2017-10-03 14:54:46 Re: Stored Procedure Performance
Previous Message Tom Lane 2017-10-02 15:29:59 Re: select with max functions