Re: distinct clause issue for 600000 records
Posted by:
Ra Nala
Date: November 13, 2015 12:37AM
Thank you. below is the SHOW VARIABLES and query for my database, please advise.
my query
-------
select distinct
psrl.id as prdsld,
psrl.psn as psn ,
psrl.bdate as bdate,
psrl.sdate as sdate ,
psrl.idate as idate,
psrl.i_no as i_no ,
psrl.tid as tid,
rn.scode as scode,
rn.rtype as rtype ,
rn.cdate as cdate ,
rn.rdate as rdate ,
rn.rreference as rreference,
rn.rsource as rsource ,
rn.r_industry as r_industry ,
r_application as r_application ,
rn.er_reference as er_reference,
rn.i_no as rn_i_no,
rn.s_per as s_per,
psrl.created_date od_created_date,
psrl.updated_date od_updated_date,
bcu.code as cbe_code,
bcu.type_code as cbe_type_code,
ead.address_1 as c_address_1,
ead.address_2 as c_address_2,
ead.address_3 as c_address_3,
ead.city as c_city,
ead.zip as c_zip,
ead.email as c_email,
rn.p_price as p_price,
rn.p_date as p_date,
be1.code r_be_code,
be1.type_code r_be_type_code,
ea2.address_1 r_be_address_1,
ea2.address_2 r_be_address_2,
ea2.address_3 r_be_address_3,
ea2.city r_be_city,
ea2.email r_be_email,
ea2.zip r_be_zip ,
rn.prdgnd as prdgnd,
psrl.ship_bed as ship_bed,
prd.prdd as modeld,
psrltn.rltd_psn as rltd_psn,
psrltn.rmod as rmod
from prdsl psrl
left join prd prd on psrl.prdd=prd.prdd
left join be_en beship on beship.id=psrl.ship_bed
left join be_en beinv on beinv.id=psrl.invoice_bed
left join be_en reginv on reginv.id=psrl.prdd
left join prdgn rn on rn.prdsld=psrl.id and rn.scode ='abc' and rn.rtype ='xyz'
left join be_en be1 on be1.id = rn.invoice_bed
left join be_gn_ad bea1 on bea1.bed = be1.id and bea1.is_preferred = 'Y'
left join enad ea2 on ea2.id = bea1.be_addressd and ea2.address_type = 'Bil'
left join be_en bcu on bcu.id=rn.cbed
left join enad ead on ead.id= rn.c_addressd
left join prrl psrltn on psrltn.prdsld = psrl.id
Subject
Views
Written By
Posted
1674
November 10, 2015 08:57AM
896
November 11, 2015 12:33PM
738
November 12, 2015 12:49AM
889
November 12, 2015 03:20AM
834
November 12, 2015 07:24PM
960
November 12, 2015 07:08AM
840
November 12, 2015 07:18AM
821
November 12, 2015 07:43AM
Re: distinct clause issue for 600000 records
894
November 13, 2015 12:37AM
816
November 13, 2015 12:45AM
859
November 13, 2015 02:42AM
888
November 13, 2015 05:56AM
883
November 13, 2015 06:38AM
908
November 13, 2015 07:15AM
944
November 13, 2015 08:11AM
887
November 13, 2015 11:35AM
942
November 16, 2015 03:04AM
872
November 16, 2015 04:12AM
791
November 16, 2015 05:54AM