From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Durgamahesh Manne <maheshpostgres9(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org |
Cc: | Andreas Kretschmer <andreas(at)a-kretschmer(dot)de> |
Subject: | Re: Regarding query execution for long time |
Date: | 2019-01-28 15:16:37 |
Message-ID: | dc700960-0477-810a-8b38-40aba8fd93f5@aklaver.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 1/28/19 4:20 AM, Durgamahesh Manne wrote:
> Hi
>
> below query is being executed for long time
>
> Select
> distinct ltrim(rtrim(ssnumber)), CL.iInsightClientId,
> ltrim(rtrim(TFA.client_account_key)) as vchAccountNumber,
> concat(TFA.first_name, ' ', TFA.last_name) as vchAccountName,
> concat('AP:TIAA', TFA.routing_number) as vchRepLabel,
> null as vchOpenDate, TFA.address1 as vchAccountTiteLine2,
> TFA.address2 as vchAccountTitleLine3,null as vchAccountType,
> TFA.address1 as vchPrimaryContact, 'TIAA-CREF' as Custodian,
> TFA.routing_number as vchCustodian_RepId, null as vchCustodianRepName,
> CONCAT ('TIAA-CREF:',ltrim(rtrim(client_account_key)),':',
> ltrim(rtrim(ssnumber))) as vchAccountKey,
> null as vchFeedsAccountType
> from accounts as TFA
> join client3 as CL on
> ltrim(rtrim(Cl.vchssnumber))=ltrim(rtrim(TFA.ssnumber))
> left join account3 as AC on
> ltrim(rtrim(AC."vchCustodianAccountNumber"))=ltrim(rtrim(TFA.client_account_key))
> where AC."iInsightAccountID" is null;
>
> query is being executed for long time even after i have created
> required indexes on columns of the tables
> please help for fast query execution
See below for information on how to report these sort of issues:
https://wiki.postgresql.org/wiki/SlowQueryQuestions
>
> Regards
> durgamahesh manne
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Durgamahesh Manne | 2019-01-28 15:20:12 | Re: Regarding query execution for long time |
Previous Message | Adrian Klaver | 2019-01-28 15:11:17 | Re: Regarding query execution for long time |