Re: Help! Very bad SQL bug in 7.2.3.0.0

From: Les Gainous <lesgainous_at_earthlink.net>
Date: 1996/10/13
Message-ID: <3261C30B.2F48_at_earthlink.net>#1/1


Tom,

How are you joining these tables? Try adding the last line (shown below). I've speeded up many a query by relating the last table back to the first. Note that this is not possible in every instance, but if so, give it a try.

where	a.x = b.x and
	b.x = c.x and
	c.x = d.x and
	d.x = e.x and
	e.x = a.x	-- add this and see what happens


good.luck = true

-- 
 Les Gainous, lesgainous_at_earthlink.net

 Visit my web page at
      http://home.earthlink.net/~lesgainous

 Looking for a Client-Server job in California?
      http://home.earthlink.net/~lesgainous/jobs.html


Tom Fielden wrote:

>
> Recipe for bad results:
>
> Join several tables sequentially like so: a-b-c-d-e
> Put a simple on 'e'.
> Observe that the query runs fast.
> Now put a simple condition on 'a'
> observe that the query is 100 times slower! Sheesh!
>
> This is so incredibly bad that Microsoft SQL server looks like a
> viable alternative.
>
> Please don't let me get sucked into the 'Gates' of hell! What is
> the work-around?
>
> Also, this seems like an extremely common type of query to run. In
> fact, a developer down the hall has an almost identical problem with
> the same effect.
>
> If you have any ideas, I would greatly appreciate hearing from you.
>
> Thanks in advance,
>
> Tom Fielden
> Mentor Graphics Corp.
Received on Sun Oct 13 1996 - 00:00:00 CEST

Original text of this message