|Subject||RE: [firebird-support] Re: Indexed used with search name='TEST' but not with name like 'TEST%'|
> >This is the single most complicated SQL statement that I have seenI agree this SQL is a good test for the problem at hand.
> > through my 14 years of using/supporting IB/FB!!!
> Layne, I *think* that for the problem being, we can reduce the SQL to
> SELECT IwadisObje_1.BOLD_ID, IwadisObje_1.BOLD_TYPE
> FROM IwadisObject IwadisObje_1
> JOIN Word Word_1 ON (IwadisObje_1.BOLD_ID = Word_1.indexedObject)
> WHERE ((Word_1.attribute = 'NAME') and (Word_1.data LIKE 'ANFRAGE%'))
> AND (IwadisObje_1.BOLD_TYPE IN (122))
> Stefan, could you test this against your data and confirm if itreproduces
> the same bad behavior?I'd also like to know:
- how many entries are in the entire IwadisObject table
- how many entries have IwadisObject BOLD_TYPE IN (122)
- how many entries are in the whole Word table
- how many Word table entries have Word_1.attribute = 'NAME'
- how many Word table entries have Word_1.data LIKE 'ANFRAGE%'
- how many Word table entries have Word_1.attribute = 'NAME' *AND*
Word_1.data LIKE 'ANFRAGE%'