Re: SELECT Query taking 200 ms on PostgreSQL compared to 4 ms on Oracle after migration.

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: aditya desai <admad123(at)gmail(dot)com>
Cc: Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Re: SELECT Query taking 200 ms on PostgreSQL compared to 4 ms on Oracle after migration.
Date: 2021-04-03 13:47:47
Message-ID: CALj2ACXN9ZohCxP-y-5qwNrHKP4y3_aNqm=usZ=YPZEiEEpiyw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

On Sat, Apr 3, 2021 at 7:08 PM aditya desai <admad123(at)gmail(dot)com> wrote:
>
> Hi,
> We migrated our Oracle Databases to PostgreSQL. One of the simple select query that takes 4 ms on Oracle is taking around 200 ms on PostgreSQL. Could you please advise. Please find query and query plans below. Gather cost seems high. Will increasing max_parallel_worker_per_gather help?

No it doesn't. For small tables, parallelism might not help since it
doesn't come for free. Try setting max_parallel_worker_per_gather to 0
i.e. without parallel query.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2021-04-03 14:08:01 Re: SELECT Query taking 200 ms on PostgreSQL compared to 4 ms on Oracle after migration.
Previous Message Kazutaka Onishi 2021-04-03 13:46:40 Re: TRUNCATE on foreign table

Browse pgsql-performance by date

  From Date Subject
Next Message Pavel Stehule 2021-04-03 14:08:01 Re: SELECT Query taking 200 ms on PostgreSQL compared to 4 ms on Oracle after migration.
Previous Message aditya desai 2021-04-03 13:38:22 SELECT Query taking 200 ms on PostgreSQL compared to 4 ms on Oracle after migration.