locked
partial index view RRS feed

  • Question

  • Hi:

    Is there something call partial index view in sql?  This is suppose to be a tech question for a interview.  I find something on filter index. 

    Can anyone help? 

    Thanks

    kmymickey

    Saturday, April 9, 2016 6:07 PM

Answers

  • "partially indexed view"? Never heard that term before. Nor do I understand what it would refer to.

    You can create a filtered index on a view, but that would be a nonclustered index, and you would first have to create a clustered index on the view.

    • Proposed as answer by Olaf HelperMVP Sunday, April 10, 2016 9:21 AM
    • Marked as answer by Eric__Zhang Sunday, April 24, 2016 9:08 AM
    Saturday, April 9, 2016 6:51 PM
  • "Partial index" is a term used by some other database vendors for indexes containing only a subset of the rows in a table, see, for example, http://www.postgresql.org/docs/9.5/static/indexes-partial.html.

    SQL Server calls that type of index a "filtered index".  The term "partial index" is not used in SQL Server.

    Tom

    • Proposed as answer by Stefan Hoffmann Saturday, April 9, 2016 11:45 PM
    • Marked as answer by Eric__Zhang Sunday, April 24, 2016 9:07 AM
    Saturday, April 9, 2016 10:50 PM

All replies

  • "partially indexed view"? Never heard that term before. Nor do I understand what it would refer to.

    You can create a filtered index on a view, but that would be a nonclustered index, and you would first have to create a clustered index on the view.

    • Proposed as answer by Olaf HelperMVP Sunday, April 10, 2016 9:21 AM
    • Marked as answer by Eric__Zhang Sunday, April 24, 2016 9:08 AM
    Saturday, April 9, 2016 6:51 PM
  • Thank you.    I am thinking the recruiter got the question mixed up. 

    Saturday, April 9, 2016 7:06 PM
  • "Partial index" is a term used by some other database vendors for indexes containing only a subset of the rows in a table, see, for example, http://www.postgresql.org/docs/9.5/static/indexes-partial.html.

    SQL Server calls that type of index a "filtered index".  The term "partial index" is not used in SQL Server.

    Tom

    • Proposed as answer by Stefan Hoffmann Saturday, April 9, 2016 11:45 PM
    • Marked as answer by Eric__Zhang Sunday, April 24, 2016 9:07 AM
    Saturday, April 9, 2016 10:50 PM