Subject Re: [firebird-support] Re: Slow SQL execution
Author Martijn Tonies
> > There are over 1.7 million records in this database. Using the free
> version of IB Expert, it doesn't allow me to view the execution plan. Is
there a way of viewing this maybe from a dos prompt.
>
>
> Plan information from IB Expert
>
> Plan
> PLAN SORT (JOIN (L NATURAL,M INDEX (CARD_TYPE_IDX1),D INDEX
(RDB$PRIMARY114,CD$$__ABB__DETAIL_8_IDX2,RULLOUT_CODE_IDX1,I_SBN_CD$$__ABB__
DETAIL_8,SUB_BATCH_NO_IDX1,I_SBN_CD$$__ABB__DETAIL_8,SUB_BATCH_NO_IDX1,I_SBN
_CD$$__ABB__DETAIL_8,SUB_BATCH_NO_IDX1,CD$$__ABB__DETAIL_8INDEX1,CD$$__ABB__
DETAIL_8INDEX1)))
>
> Adapted Plan
> PLAN SORT (JOIN (L NATURAL,M INDEX (CARD_TYPE_IDX1),D INDEX
(INTEG_390,CD$$__ABB__DETAIL_8_IDX2,RULLOUT_CODE_IDX1,I_SBN_CD$$__ABB__DETAI
L_8,SUB_BATCH_NO_IDX1,I_SBN_CD$$__ABB__DETAIL_8,SUB_BATCH_NO_IDX1,I_SBN_CD$$
__ABB__DETAIL_8,SUB_BATCH_NO_IDX1,CD$$__ABB__DETAIL_8INDEX1,CD$$__ABB__DETAI
L_8INDEX1)))
>
>
> Here is a little more information.
> Thanks for the help so far...

Did you re-write the query to a proper join syntax yet?

If so, does that change the plan?

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com