Thread: Slow Query
Hi Expert,
we are having weird issue, i have query that is running fine when i run that in pgadmin. however same query keep running from application. I checked the explain plan and other details and did not found anything.
Can you please help me, how can i figure out more to identify the root cause.
Regards,
Anjul TYAGI
ü Go Green
Hi,
First of all you need to check you query once. While in PostgreSQL we can only test fewer data than the whole.
We always use limit in editor to test query. Its costly when you use select everything from table. Can we see your query and execution plan.
On Mon, 26 Aug 2019, 6:11 p.m. Anjul Tyagi, <anjul@ibosstech-us.com> wrote:
Hi Expert,we are having weird issue, i have query that is running fine when i run that in pgadmin. however same query keep running from application. I checked the explain plan and other details and did not found anything.Can you please help me, how can i figure out more to identify the root cause.Regards,
Anjul TYAGI
ü Go Green
I am running query without limit.. it works fine in PGAdmin.
Regards,
Anjul TYAGI
ü Go Green
------ Original Message ------
From: "sunil kumar" <sunildeshalhre92@gmail.com>
To: "Anjul Tyagi" <anjul@ibosstech-us.com>
Cc: "pgsql-admin" <pgsql-admin@postgresql.org>
Sent: 26-08-2019 18:54:27
Subject: Re: Slow Query
Hi,First of all you need to check you query once. While in PostgreSQL we can only test fewer data than the whole.We always use limit in editor to test query. Its costly when you use select everything from table. Can we see your query and execution plan.On Mon, 26 Aug 2019, 6:11 p.m. Anjul Tyagi, <anjul@ibosstech-us.com> wrote:Hi Expert,we are having weird issue, i have query that is running fine when i run that in pgadmin. however same query keep running from application. I checked the explain plan and other details and did not found anything.Can you please help me, how can i figure out more to identify the root cause.Regards,
Anjul TYAGI
ü Go Green
On Mon, Aug 26, 2019 at 3:27 PM Anjul Tyagi <anjul@ibosstech-us.com> wrote: > > I am running query without limit.. it works fine in PGAdmin. > You haven't specified the execution plan, nor the application technology. My 2 cents go to the fact that the application (driver) could be allocating resources to handle the query, and that is something that costs. Are you really sure the query executed by the application is the query you are running or is there any ORM behind the scene? What about using auto_explain to see what happens? Luca
Ok.. so may i know the caller platform.. and how you are calling the query whether it is a Funtion or a query only. And which type of conditions you are applying to return data?
On Mon, 26 Aug 2019, 7:16 p.m. Luca Ferrari, <fluca1978@gmail.com> wrote:
On Mon, Aug 26, 2019 at 3:27 PM Anjul Tyagi <anjul@ibosstech-us.com> wrote:
>
> I am running query without limit.. it works fine in PGAdmin.
>
You haven't specified the execution plan, nor the application technology.
My 2 cents go to the fact that the application (driver) could be
allocating resources to handle the query, and that is something that
costs.
Are you really sure the query executed by the application is the query
you are running or is there any ORM behind the scene?
What about using auto_explain to see what happens?
Luca