Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Why does using two indexes slow down my query?
Re-analyze the table using a sample size. You implied that you used the
default estimate which generates terrible results for larger tables. Try
'analyze table my_table estimate statistics sample 50000 rows;' and the
re-try your query. Alternately you could just re-analyze the indexes doing
computes on them and check for any effect on your query performance.
patrickk_at_mindspring.com wrote in article
<6ljb91$e3t$1_at_nnrp1.dejanews.com>...
> I'm having a problem with Oracle that I have not seen in other DBMSs.
I'm no
>
table
> of about 5 million rows. Each record is relatively wide (300 bytes
so).
> I am using Oracle 7.3 for NT.
> count(*)
> "9,000"
> indexed_colum2 = 'C'
BOTH
> indexed columns in the query such as this:
> my_table
> takes upwards of 15 minutes. My past expereince with DBMSs (Informix,
> RedBrick, SQLServer) has been that the more narrow I make my constraints,
> the faster the query returns values...
> analyze.
> appreciated.
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
>
Received on Tue Jun 09 1998 - 08:40:54 CDT