| From: | vinny <vinny(at)xs4all(dot)nl> |
|---|---|
| To: | Mariel Cherkassky <mariel(dot)cherkassky(at)gmail(dot)com> |
| Cc: | pgsql-performance(at)postgresql(dot)org |
| Subject: | Re: query runs for more than 24 hours! |
| Date: | 2017-08-25 07:06:00 |
| Message-ID: | 754d24d26f8a4da4e3a3d43157d7a036@xs4all.nl |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
On 2017-08-22 16:23, Mariel Cherkassky wrote:
>
> SELECT a.inst_prod_id,
> product_id,
> nap_area2,
> nap_phone_num,
> nap_product_id,
> b.nap_discount_num,
> b.nap_makat_cd,
> nap_act_start_dt,
> b.nap_debt_line,
> nap_act_end_dt,
> b.row_added_dttm
> b.row_lastmant_dttm,
> FROM ps_rf_inst_prod a,
> AND a.setid || ''= 'SHARE'
> nap_ip_discount b
> WHERE nap_crm_status = 'C_04'
> AND b.nap_makat_cd IN (SELECT
> term_code AND b.setid || ''=
> 'SHARE'
> AND a.inst_prod_id =
On my screen the order of the lines in the query seem to get messed up,
I'm not sure if that's my email program or a copy/paste error.
From what I can see, you are using subselects in an IN statement,
which can be a problem if that has to be re-evaluated a lot.
It's hard for me to say more because I can't tell what the actual query
is at the moment.
Regards, Vincent.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Neto pr | 2017-08-25 08:31:44 | Execution plan analysis |
| Previous Message | Daulat Ram | 2017-08-25 06:49:07 | Re: Hi |