Subject | Re: Same Query - Dirrerent GDBs - Different Plan |
---|---|
Author | rodbracher |
Post date | 2002-10-03T13:13:19Z |
>Both stats checked after a restore/backup
> The information that would help is the selectivity numbers from
> rdb$indices for the tables involved.
>
GDB SLOW
PLAN SORT (JOIN (JOIN (JOIN (WAYBILL NATURAL,
ROUTING INDEX (RDB$PRIMARY58,RO_MANIFEST)),
PLACE INDEX (RDB$PRIMARY50)),CONTENTS INDEX (RDB$PRIMARY17)))
RDB$STATISTICS
Routing Table
RDB$PRIMARY58 = 1.276
RO_MANIFEST = 6.037
Waybill Table
RDB$PRIMARY67 = 1.972
GDB FAST
PLAN SORT (JOIN (JOIN (JOIN (ROUTING INDEX (RO_MANIFEST),
WAYBILL INDEX (RDB$PRIMARY67)),PLACE INDEX (RDB$PRIMARY50)),
CONTENTS INDEX (RDB$PRIMARY17)))
RDB$STATISTICS
Routing Table
RDB$PRIMARY58 = 5.608
RO_MANIFEST = 0.000127
Waybill Table
RDB$PRIMARY67 = 1.549
So clearly a big difference in the Primay and RO_MANIFEST between the
two GDBs
How is this selectivity used ?
And still the point is if I use the Plan of the fast table on the
slow table - it too becomes fast ( with the query mentioned ).
Rod