This discussion is archived
3 Replies Latest reply: Jan 17, 2013 5:22 AM by SeshuNaresh RSS

Spatial Index- Rtree Indexing

SeshuNaresh Newbie
Currently Being Moderated
Hello,

I have a spatial table. i have created index. If I keep on inserting data in my table do i need to rebuilt the index or is the data automatically indexed?
  • 1. Re: Spatial Index- Rtree Indexing
    John O'Toole Journeyer
    Currently Being Moderated
    Hi 951616,

    Yes, of course the RTree index is maintained automatically as you insert/update/delete the sdo_geometry contents of the table.

    John
  • 2. Re: Spatial Index- Rtree Indexing
    Stefan Jager Journeyer
    Currently Being Moderated
    Hi 951616,

    Now this is interesting. Originally I was going to say that you need to maintain the quality of your spatial index yourself, but when I looked up the documentation for 11R2 I found a note that [url http://docs.oracle.com/cd/E11882_01/appdev.112/e11830/sdo_objtune.htm#CACHEDCG]SDO_TUNE.QUALITY_DEGRADATION has been deprecated because
    You should not use this function. It is not needed because Spatial indexes are self-tuning.
    Thatmust be new in 11R2 I suppose? I always used to set up a Job to keep an eye on the index for frequently changing tables, but that seems not to be needed anymore. So your answer is: No, you don't :-)

    You learn something new every day :-)

    Cheers,
    Stefan
  • 3. Re: Spatial Index- Rtree Indexing
    SeshuNaresh Newbie
    Currently Being Moderated
    Thanks you all...
    I will alter my index only when the index is corrupt or if I receive any exception. I will also have an eye on the index_status and SDO_RTREE_QUALITY parameters.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points