Subject RE: [firebird-support] There must be a better way.
Author Nigel Weeks
> Because it's an ANDed search, re-entrant inner joins would be
> cheaper than the correlated subqueries (I think, but test!)
>
> Select tpw.str_href from tbl_pageword tpw join tbl_words tw1
> on tw1.int_word = tpw.int_word join tbl_words tw2 on
> tw2.int_word = tpw.int_word join tbl_words tw3 on
> tw3.int_word = tpw.int_word where tw1.str_word = ? /* string1 */
> and tw2.str_word = ? /* string2 */
> and tw3.str_word = ? /* string3*/
>

A great big burly thanks to all you guys (and girl) who responded!
Lunch is in 25 minutes, so I'll give them a bash then!

Nige.