Subject RE: [firebird-support] mystery
Author Leyne, Sean
> -----------------------------------------------------------
> SELECT c.clntid, c.surname, c.forename, c.title, c.siteid, v.vacid,
> v.jobtitle, v.vactype, v.rate, v.isactive, co.compname, c.email
> FROM Vacancy v
> JOIN Client c ON c.clntid=v.clntid
> JOIN Site s ON c.siteid=s.siteid
> JOIN Company co ON s.compid=co.compid
> WHERE
> ( ( s.REGIONID IN(3,1,2,4) ) )
>
> PLAN JOIN (S INDEX
>
(IDXSITE_REGIONID,IDXSITE_REGIONID,IDXSITE_REGIONID,IDXSITE_REGIONID),CO
> INDEX (PK_COMPANY),C INDEX (FK1_CLIENT),V INDEX (FK1_VACANCY))
>
> ------ Performance info ------
> Prepare time = 0ms
> Execute time = 8m 28s 594ms (!)
>
> Company count: 32484
> Site count: 38837
> Client count: 117194
> Vacancy count: 21755

What are the results of:

SELECT S.REGIONID, Count(*) FROM Site S GROUP BY 1


Sean