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.
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance