function-based index 
Author Message
 function-based index

I have a field in my "products" table called "Flags",
varchar(20) filled with 1 or 0, each character is a
representation of a flag status:

edpno        flags
-----        -----
122345       1100101011
987886       0100001001

  position 1 represents the Active status
  position 2 represents available inventory
  position 3 represents displayable flag

We have created a function that returns the value for a
given position within the flags field; a query to that
table will look like this:

select edpno
  from products
 where dbo.GetFlags(flags,'Active') = 1
 and   dbo.GetFlags(flags,'AvailInv') = 1

Can I create an index based on this function?
Is this the right design to solve this issue? I can have
multiple flags being added later on, that's why we
designed like this instead of creating a field per flag.


Mon, 24 Oct 2005 03:52:21 GMT
 [ 1 post ] 

 Relevant Pages 

1. ORA-01031 with Create Index for a Function Based Index

2. Function based indexes and index fast full scan

3. Function Based indexes in SQL Server

4. function-based index permissions problem

5. Function-Based index

6. How I can create a function-based index ?

7. Privilegies on function based indexes

8. Function Based Indexes with in clause?

9. Function Based Indexes???

10. Which edition of Oracle9i supports function-based indexes?

11. function-based indexes

12. Function based index gets ignored.

Powered by phpBB® Forum Software