Subject Re: [firebird-support] Query help - Email found in subject
Author Kjell Rilbe
Den 2012-07-23 00:24 skrev Leyne, Sean s�h�r:
>
> Kjell,
>
> > Trying to figure out a way to do a search/query with decent performance.
> >
> > Table "Master" contains roughly 100 million records and table "Detail"
> > contains roughly 200 million records.
>
> > Unfortunately, this will cause a natural scan of the 100 million record
> > "Master" table, and roughly 200 million subselects...
> >
> > Can anyone figure out a way to avoid a full table scan?
>
> What is the "selectivity" of Detail rows to Master (What % of Master
> don't have Details)?
>

I'd say something like one master of about 100-1000 would have no
details, i.e. probably at least 99 percent do have at least one detail.

> I am afraid that there won't be much that can be done to avoid the
> basic problem.
>

:-(

Kjell

--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: kjell@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64



[Non-text portions of this message have been removed]