| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Serious pb with INDEX_HISTOGRAM
Hi,
How do you explain this: I have a table XXX
SQL> desc XXX
Name Null? Type ---------------------------- -------- ------------------ ... KM_DENORM NUMBER(18)
that contains 264911 rows. This field above is indexed because *it contains 264911 different values* (=> count(1)/count(distinct km_denorm) = 1). Yet when I do an ANALYZE INDEX VALIDATE STRUCTURE, I get:
REPEAT_COUNT KEYS_WITH_REPEAT_COUNT
------------ ----------------------
0 0
1 264911
2 0
3 0
4 0
[...]
15 0
with SELECT * FROM index_histogram. How do you explain this ? My index
is NEVER used, there's obviously no way of forcing the optimizer to use
it (whatever the INDEX() hint I use). For ex. I'd like to be able to get
a very quick answer to (the other index on XXX.VEHID works fine):
SELECT (...)
FROM XXX KM
WHERE KM.km_denorm = (SELECT MAX(D2.km_denorm)
FROM XXX D2
WHERE D2.VEHID=KM.VEHID)
The values look like the following:
SQL> select min(KM_DENORM), max(km_denorm) from XXX;
KM_DENORM KM_DENORM
------------------- -------------------
19720101009089 20021217272582
Any idea ?
Thanks a lot...
Sp
Received on Mon Jan 27 2003 - 09:53:15 CST
![]() |
![]() |