Re: View taking time to show records

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: "Kumar, Mukesh" <MKumar(at)peabodyenergy(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: View taking time to show records
Date: 2022-03-25 10:39:15
Message-ID: 20220325103915.GA21555@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, Mar 24, 2022 at 03:59:54PM +0000, Kumar, Mukesh wrote:
> Can anyone suggest to improve the query as from application end 1 min time is not accepted by client.
> Please find the query and explain analyze report from below link

It's hard to say for sure without seeing real query (query on view is
nice, but we can't tell what is going on there, really) - we'd need to
know definitions of all views and tables that are involved there.

for starters, I'd suggest adding indexes:
1. on so_vendor_address_base (ap_vendor_id_lf || ap_vendor_suffix_lf)
2. on so_vendor_address_base (vendor_type_f)

whether this will fix the problem, can't really tell.

Also - you might want to join slack/irc to have a conversation about it
- there are people in there who can help, and I think that
conversation-style help will be better suited for this particular
problem.

Best regards,

depesz

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Laurenz Albe 2022-03-25 10:43:20 Re: View taking time to show records
Previous Message aditya desai 2022-03-25 10:20:26 Re: View taking time to show records