SQL performance issue after migration from Oracle to Aurora postgres

2022-04-14 Thread Goti
Hi All,

We migrated from Oracle 12.1 to Aurora postgres 12.8.1. The query in Oracle
takes less than a millisecond however the same query in aurora is taking
more than a second. We have a larger number of executions for the SQL which
is causing an overall latency for the application. I am new to postgres and
trying to get some ideas around how better we can optimize. I have the plan
details for the SQL as below. Can someone shed some light on possible ways
that can make this query to meet its original execution time?

https://explain.depesz.com/s/jlVc#html

Thanks,

Goti


How to find the final transformed query in postgresql

2022-04-18 Thread Goti
Hi Geeks,

Env: postgres12

I am new to postgres and coming from an Oracle background. Please excuse me
if I am not asking valid questions.

 I would like to know if postgres performs any transformations when it does
the parsing? If yes, is there a way we can get the final transformed query?

Thanks,

Goti


Re: How to find the final transformed query in postgresql

2022-04-18 Thread Goti
Thanks a lot Tom.

Thanks,

Goti


On Mon, Apr 18, 2022 at 7:43 PM Tom Lane  wrote:

> Goti  writes:
> >  I would like to know if postgres performs any transformations when it
> does
> > the parsing?
>
> This might be helpful reading:
>
> https://www.postgresql.org/docs/current/overview.html
>
> > If yes, is there a way we can get the final transformed query?
>
> See debug_print_parse and friends [1].  Depending on what you mean by
> "final transformed query", you might instead want debug_print_rewritten,
> or maybe you want the plan, in which case EXPLAIN is a much friendlier
> way to look at it than debug_print_plan.
>
> regards, tom lane
>
> [1]
> https://www.postgresql.org/docs/current/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHAT
>


Logical reads

2022-05-31 Thread Goti
Hi listers,

Is there any sql query which we can use to find the logical reads performed
by particular sql statement in postgres ??

Thanks,
Goti
-- 
Thanks,

Goti