Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Increased query time adding an index
Have you calculated the statistics on your tables and indexes. if not then
the optmizer will use the rule based optimizer mode which is not very
efficient. Try calculating the statistics and running the query.
hope it helps
Vishal
Giancarlo Sanna wrote:
> I added an index to a table in order to speed up a query in my
> application.
> The query, after the index creation, improved its performances but
> another
> query (a join on several tables one of which was the table on which I
> added the index)
> increased its execution time from four seconds to more than an hour (I
> actually killed
> the process after one hour).
> How is it possible? Why the optimizer doesn't simply ignore the new
> index if it is not
> useful for him?
> Moreover I added another index on the columns that were present in the
> where condition
> of the second query but until I dropped the first index the second query
> didn't work.
>
> Can anybody help me?
>
> ---------------------------------------------
> Giancarlo Sanna
> IBM Italia S.p.A.
> email: Giancarlo_Sanna_at_it.ibm.com
Received on Thu Jun 18 1998 - 05:05:58 CDT