Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2010
    Posts
    24

    Unanswered: What is this 0 in "create index indexx on tablex (columnx,0)"?

    I see this ' function-based index':

    create index indexx on tablex (columnx,0)

    What does the '0' do here?

    Thanks!

  2. #2
    Join Date
    Mar 2007
    Posts
    623
    What does the '0' do here?
    I would also like to ask this to the person who created it. Or, if it was created with script, I would like to see what was its supposed and actual input.

    As '0' here means constant expression '0', I see no benefit against a simple index on COLUMNX instead of increasing its size and slightly confusing optimizer (or testing its abilities).

  3. #3
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    This is a trick to force nulls into the index. Normally nulls are not indexed.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  4. #4
    Join Date
    Feb 2010
    Posts
    24
    Thanks.

    I think bill is right.

Posting Permissions

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