Home > database >  Multi-table query optimization
Multi-table query optimization

Time:09-24

I will from 4 table query associated data inside, including A, B, C SLID table has the same corresponding field, C and D table have A corresponding field QLRID, I with the following statement query particularly slow, have A great god can help me to optimize it? Is there a more efficient way,

Select distinct a.f wsuoyqlr, a.q LRZJBH, a. d. JSJ, a. DCQZH, b.q lr2, b.q lrzjbh2, c.q lrid, d.d h from BDC_REGN_FWSYQ a, bdc_req b, c, bdc_qlrlb bdc_qlr d where a.s lid=b.s lid and b.s lid=c.s. lid and c.q lrid=d.q lrid
And a. d. JSJ between to_date (' 2016-04-29 ', '- dd yyyy - mm) and to_date (' 2016-07-22', '- dd yyyy - mm);

CodePudding user response:

Why don't you do the main table to table C? But don't know can optimize quickens

CodePudding user response:

Posted on the execution plan

CodePudding user response:

Use with T1 as
(select c.s. lid, mount dcdyh, c.d yid, d.d h, c.q lrid from
Bdc_qlrlb c, bdc_qlr d wheree c.q lrid=d.q lrid)
The select...
The writing you have any question, not a one-to-one association
  • Related