Subject | Re: [firebird-support] Facing big red brick wall (Optional Values) |
---|---|
Author | Daniel Rail |
Post date | 2006-05-06T09:07:54Z |
Hi,
At May 6, 2006, 5:39 AM, Tom Conlon wrote:
--
Best regards,
Daniel Rail
Senior Software Developer
ACCRA Consultants Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)
At May 6, 2006, 5:39 AM, Tom Conlon wrote:
> FB is very fast (~1 sec) when all values are mandatory:What is the query's plan for this query?
> SELECT t0.candidateid
> FROM candidateAttribute t0
> JOIN CandidateAttribute t1 ON (t1.Candidateid=t0.Candidateid AND
> t1.Attributeid=34 AND T1.RATING<200)
> JOIN CandidateAttribute t2 ON (t2.Candidateid=t0.Candidateid AND
> t2.Attributeid=321 )
> JOIN CandidateAttribute t3 ON (t3.Candidateid=t0.Candidateid AND
> t3.Attributeid=3563 )
> JOIN CandidateAttribute t4 ON (t4.Candidateid=t0.Candidateid AND
> t4.Attributeid=29 )
> WHERE t0.Attributeid =256
> However, add this line (or a NOT variation) for optional attributesWhat is the query's plan after adding that line?
> and FB takes over 3minutes with the server working very hard:
> JOIN CandidateAttribute t5 ON (t5.Candidateid=t0.Candidateid AND
> t5.Attributeid IN(3916,1402,784,3461,2184))
--
Best regards,
Daniel Rail
Senior Software Developer
ACCRA Consultants Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)