Results 1 to 2 of 2

Thread: Index location

  1. #1
    Join Date
    Jul 2006

    Unanswered: Index location

    Read from manual before(but forget it's true or not), cluster index will locate same as data into data page but non-clustered index will locate into separate data page and hv pointer linking to the "data" page.

    So searching by cluster index will faster than non-clustered index one. is it?

  2. #2
    Join Date
    Jan 2003
    Geneva, Switzerland
    It depends.

    For APL tables the data pages correspond to the leaf pages of the clustered index - so things like range searches via the clustered index key are quite fast.

    For DOL tables the clustered index is a "placement" index. This means that new data will be placed as close as possible to existing data with respect to the clustered index order, and if you create the clustered index on a segment then the data pages will also migrate to that segment. Range searches will probably still be faster via the clustered index as ASE will try to keep the data pages "close".

    However, a lot of accesses to data is not done via range queries - and in that situation the clustered index won't necessarily be faster.

    Also keep in mind that a clustered index may slow down inserts (again, it depends on the situation).

    So, to summarize - you need to analyze your actual system to determine what type of index you need, and which index (if any) on each table should be the clustered index.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts