Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: IOT or Cluster or neither
Adi
> If my PK is user_id,id wont the index be used for queries of type
> "where
> user_id=<value>" ? My understanding was that since the PK starts
> with
> user_id that it would use the PK index.
You mentioned that "id" is generated through a sequence. I would never add to a primary key another attribute just because I would like to store that table in an IOT. IMHO it's just bad design.
> I could partition using hash of user_id but this does not solve my
> problem, i.e. Wanting to "group" rows for a user together to reduce
> IO.
I didn't mention hash partitioning ;-) Without more information about data distribution and the kind of queries you would like to optimize on it, it's simply impossible to give an advice. That said, as I wrote, IMHO only partitioning can save you.
> With partitioning for users who have larger number of rows the
> partition would not only be large but within the partition the rows
> for a user would not necessarily live together on disk.
Mhmm... you wrote ">10000". IMHO this is not a huge amount compared to the total number of rows stored in the table.
HTH
Chris
-- http://www.freelists.org/webpage/oracle-lReceived on Fri Aug 18 2006 - 18:53:38 CDT
![]() |
![]() |