Subject Re: [firebird-support] Forcing SQL Plans
Author Arno Brinkman
Hi,

SELECT
CAST( SPG.STOREGROUPID AS VARCHAR(10)),
CAST( SPG.PROMID AS VARCHAR(14)),
MIN( SPG.COSTSTARTDATE )
FROM
SUPPLIERPROMGROUP SPG
JOIN FILTERSTD F ON( F.FILTERID = 174) AND
( CAST( SPG.HOSTNUMBER AS VARCHAR(14)) = F.CODE1) AND
( SPG.COSTSTARTDATE IS NOT NULL) AND
(SPG.OWNERID = 'G0000026')
GROUP BY
SPG.STOREGROUPID, SPG.PROMID

PLAN SORT (JOIN (SPG INDEX (IDX_SUPPROMGROUP_COSTEND), F INDEX (RDB$PRIMARY211)))

Any special reason why everything is in the ON clause?

> The plan used was using the IDX_SUPPROM_GROUP_COSTEND Index.

Can u show us the definition of the index IDX_SUPPROM_GROUP_COSTEND and IDX_SUPPROMGROUP_COSTSTART.

Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database with many powerful SQL features:
http://www.firebirdsql.org
http://www.firebirdsql.info

General database developer support:
http://www.databasedevelopmentforum.com

Support list for Interbase and Firebird users:
firebird-support@yahoogroups.com

Nederlandse firebird nieuwsgroep:
news://newsgroups.firebirdsql.info