Subject | Re: indices |
---|---|
Author | Adam |
Post date | 2007-05-13T13:14:41Z |
> I have a table with about 18000 rows and i had no indices defined.Are you sure about the no indices thing? If you have declared a
>
foreign key constraint, Firebird will automatically create an index
for you.
> I have a query with about 10 joins of this table and other tables inDon't worry about that, it will take care of it for you. The only
> DB. It takes very long time. Now i have defined the indices by a
> fields which are used in JOINs.
>
> How do i force the DB to build the index for rows which are already in
> DB? Because it doesnt look like the query is now using the new indices.
thing you may want to consider is running
SET STATISTICS <index name>;
This will make sure the optimiser has the best information to make
decisions.
If you are still not satisfied with performance, post the relevant
table structures, query, and plan, and we can see if there is anything
that can be improved by offering tips to the optimiser.
Adam